var searchIndex = {}; searchIndex["serde_json"] = {"doc":"JSON and serialization","items":[[0,"builder","serde_json","JSON Builders",null,null],[3,"ArrayBuilder","serde_json::builder","This structure provides a simple interface for constructing a JSON array.",null,null],[3,"ObjectBuilder","","This structure provides a simple interface for constructing a JSON object.",null,null],[11,"new","","Construct an `ObjectBuilder`.",0,{"inputs":[],"output":{"name":"arraybuilder"}}],[11,"unwrap","","Return the constructed `Value`.",0,null],[11,"push","","Insert a value into the array.",0,null],[11,"push_array","","Creates and passes an `ArrayBuilder` into a closure, then inserts the resulting array into\nthis array.",0,null],[11,"push_object","","Creates and passes an `ArrayBuilder` into a closure, then inserts the resulting object into\nthis array.",0,null],[11,"new","","Construct an `ObjectBuilder`.",1,{"inputs":[],"output":{"name":"objectbuilder"}}],[11,"unwrap","","Return the constructed `Value`.",1,null],[11,"insert","","Insert a key-value pair into the object.",1,null],[11,"insert_array","","Creates and passes an `ObjectBuilder` into a closure, then inserts the resulting array into\nthis object.",1,null],[11,"insert_object","","Creates and passes an `ObjectBuilder` into a closure, then inserts the resulting object into\nthis object.",1,null],[0,"de","serde_json","JSON Deserialization",null,null],[3,"Deserializer","serde_json::de","A structure that deserializes JSON into Rust values.",null,null],[3,"StreamDeserializer","","Iterator that deserializes a stream into multiple JSON values.",null,null],[5,"from_iter","","Decodes a json value from an iterator over an iterator\n`Iterator<Item=io::Result<u8>>`.",null,{"inputs":[{"name":"i"}],"output":{"name":"result"}}],[5,"from_reader","","Decodes a json value from a `std::io::Read`.",null,{"inputs":[{"name":"r"}],"output":{"name":"result"}}],[5,"from_slice","","Decodes a json value from a byte slice `&[u8]`.",null,null],[5,"from_str","","Decodes a json value from a `&str`.",null,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"new","","Creates the JSON parser from an `std::iter::Iterator`.",2,{"inputs":[{"name":"iter"}],"output":{"name":"deserializer"}}],[11,"end","","The `Deserializer::end` method should be called after a value has been fully deserialized.\nThis allows the `Deserializer` to validate that the input stream is at the end or that it\nonly has trailing whitespace.",2,null],[11,"deserialize","","",2,null],[11,"deserialize_option","","Parses a `null` as a None, and any other values as a `Some(...)`.",2,null],[11,"deserialize_newtype_struct","","Parses a newtype struct as the underlying value.",2,null],[11,"deserialize_enum","","Parses an enum as an object like `{"$KEY":$VALUE}`, where $VALUE is either a straight\nvalue, a `[..]`, or a `{..}`.",2,null],[11,"visit_variant","","",2,null],[11,"visit_unit","","",2,null],[11,"visit_newtype","","",2,null],[11,"visit_tuple","","",2,null],[11,"visit_struct","","",2,null],[11,"new","","Returns an `Iterator` of decoded JSON values from an iterator over\n`Iterator<Item=io::Result<u8>>`.",3,{"inputs":[{"name":"iter"}],"output":{"name":"streamdeserializer"}}],[11,"next","","",3,null],[0,"error","serde_json","JSON Errors",null,null],[4,"ErrorCode","serde_json::error","The errors that can arise while parsing a JSON stream.",null,null],[13,"Custom","","Catchall for syntax error messages",4,null],[13,"InvalidType","","Incorrect type from value",4,null],[13,"InvalidValue","","Incorrect value",4,null],[13,"InvalidLength","","Invalid length",4,null],[13,"UnknownVariant","","Unknown variant in an enum.",4,null],[13,"UnknownField","","Unknown field in struct.",4,null],[13,"MissingField","","Struct is missing a field.",4,null],[13,"EOFWhileParsingList","","EOF while parsing a list.",4,null],[13,"EOFWhileParsingObject","","EOF while parsing an object.",4,null],[13,"EOFWhileParsingString","","EOF while parsing a string.",4,null],[13,"EOFWhileParsingValue","","EOF while parsing a JSON value.",4,null],[13,"ExpectedColon","","Expected this character to be a `':'`.",4,null],[13,"ExpectedListCommaOrEnd","","Expected this character to be either a `','` or a `]`.",4,null],[13,"ExpectedObjectCommaOrEnd","","Expected this character to be either a `','` or a `}`.",4,null],[13,"ExpectedSomeIdent","","Expected to parse either a `true`, `false`, or a `null`.",4,null],[13,"ExpectedSomeValue","","Expected this character to start a JSON value.",4,null],[13,"InvalidEscape","","Invalid hex escape code.",4,null],[13,"InvalidNumber","","Invalid number.",4,null],[13,"InvalidUnicodeCodePoint","","Invalid unicode code point.",4,null],[13,"KeyMustBeAString","","Object key is not a string.",4,null],[13,"LoneLeadingSurrogateInHexEscape","","Lone leading surrogate in hex escape.",4,null],[13,"TrailingCharacters","","JSON has non-whitespace trailing characters after the value.",4,null],[13,"UnexpectedEndOfHexEscape","","Unexpected end of hex excape.",4,null],[4,"Error","","This type represents all possible errors that can occur when serializing or deserializing a\nvalue into JSON.",null,null],[13,"Syntax","","The JSON value had some syntatic error.",5,null],[13,"Io","","Some IO error occurred when serializing or deserializing a value.",5,null],[13,"FromUtf8","","Some UTF8 error occurred while serializing or deserializing a value.",5,null],[6,"Result","","Helper alias for `Result` objects that return a JSON `Error`.",null,null],[11,"eq","","",4,null],[11,"ne","","",4,null],[11,"clone","","",4,null],[11,"fmt","","",4,null],[11,"fmt","","",5,null],[11,"description","","",5,null],[11,"cause","","",5,null],[11,"fmt","","",5,null],[11,"from","","",5,{"inputs":[{"name":"error"}],"output":{"name":"error"}}],[11,"from","","",5,{"inputs":[{"name":"fromutf8error"}],"output":{"name":"error"}}],[11,"from","","",5,{"inputs":[{"name":"error"}],"output":{"name":"error"}}],[11,"custom","","",5,{"inputs":[{"name":"t"}],"output":{"name":"error"}}],[11,"end_of_stream","","",5,{"inputs":[],"output":{"name":"error"}}],[11,"invalid_type","","",5,{"inputs":[{"name":"type"}],"output":{"name":"error"}}],[11,"invalid_value","","",5,{"inputs":[{"name":"str"}],"output":{"name":"error"}}],[11,"invalid_length","","",5,{"inputs":[{"name":"usize"}],"output":{"name":"error"}}],[11,"unknown_variant","","",5,{"inputs":[{"name":"str"}],"output":{"name":"error"}}],[11,"unknown_field","","",5,{"inputs":[{"name":"str"}],"output":{"name":"error"}}],[11,"missing_field","","",5,{"inputs":[{"name":"str"}],"output":{"name":"error"}}],[11,"custom","","Raised when there is general error when deserializing a type.",5,{"inputs":[{"name":"t"}],"output":{"name":"error"}}],[0,"ser","serde_json","JSON Serialization",null,null],[3,"Serializer","serde_json::ser","A structure for serializing Rust values into JSON.",null,null],[3,"CompactFormatter","","This structure compacts a JSON value with no extra whitespace.",null,null],[3,"PrettyFormatter","","This structure pretty prints a JSON value to make it human readable.",null,null],[5,"escape_bytes","","Serializes and escapes a `&[u8]` into a JSON string.",null,null],[5,"escape_str","","Serializes and escapes a `&str` into a JSON string.",null,{"inputs":[{"name":"w"},{"name":"str"}],"output":{"name":"result"}}],[5,"to_writer","","Encode the specified struct into a json `[u8]` writer.",null,{"inputs":[{"name":"w"},{"name":"t"}],"output":{"name":"result"}}],[5,"to_writer_pretty","","Encode the specified struct into a json `[u8]` writer.",null,{"inputs":[{"name":"w"},{"name":"t"}],"output":{"name":"result"}}],[5,"to_vec","","Encode the specified struct into a json `[u8]` buffer.",null,{"inputs":[{"name":"t"}],"output":{"name":"result"}}],[5,"to_vec_pretty","","Encode the specified struct into a json `[u8]` buffer.",null,{"inputs":[{"name":"t"}],"output":{"name":"result"}}],[5,"to_string","","Encode the specified struct into a json `String` buffer.",null,{"inputs":[{"name":"t"}],"output":{"name":"result"}}],[5,"to_string_pretty","","Encode the specified struct into a json `String` buffer.",null,{"inputs":[{"name":"t"}],"output":{"name":"result"}}],[8,"Formatter","","This trait abstracts away serializing the JSON control characters, which allows the user to\noptionally pretty print the JSON output.",null,null],[10,"open","","Called when serializing a '{' or '['.",6,null],[10,"comma","","Called when serializing a ','.",6,null],[10,"colon","","Called when serializing a ':'.",6,null],[10,"close","","Called when serializing a '}' or ']'.",6,null],[11,"new","","Creates a new JSON serializer.",7,{"inputs":[{"name":"w"}],"output":{"name":"self"}}],[11,"pretty","","Creates a new JSON pretty print serializer.",7,{"inputs":[{"name":"w"}],"output":{"name":"self"}}],[11,"with_formatter","","Creates a new JSON visitor whose output will be written to the writer\nspecified.",7,{"inputs":[{"name":"w"},{"name":"f"}],"output":{"name":"self"}}],[11,"into_inner","","Unwrap the `Writer` from the `Serializer`.",7,null],[11,"serialize_bool","","",7,null],[11,"serialize_isize","","",7,null],[11,"serialize_i8","","",7,null],[11,"serialize_i16","","",7,null],[11,"serialize_i32","","",7,null],[11,"serialize_i64","","",7,null],[11,"serialize_usize","","",7,null],[11,"serialize_u8","","",7,null],[11,"serialize_u16","","",7,null],[11,"serialize_u32","","",7,null],[11,"serialize_u64","","",7,null],[11,"serialize_f32","","",7,null],[11,"serialize_f64","","",7,null],[11,"serialize_char","","",7,null],[11,"serialize_str","","",7,null],[11,"serialize_none","","",7,null],[11,"serialize_some","","",7,null],[11,"serialize_unit","","",7,null],[11,"serialize_newtype_struct","","Override `visit_newtype_struct` to serialize newtypes without an object wrapper.",7,null],[11,"serialize_unit_variant","","",7,null],[11,"serialize_newtype_variant","","",7,null],[11,"serialize_seq","","",7,null],[11,"serialize_tuple_variant","","",7,null],[11,"serialize_seq_elt","","",7,null],[11,"serialize_map","","",7,null],[11,"serialize_struct_variant","","",7,null],[11,"serialize_map_elt","","",7,null],[11,"open","","",8,null],[11,"comma","","",8,null],[11,"colon","","",8,null],[11,"close","","",8,null],[11,"new","","Construct a pretty printer formatter that defaults to using two spaces for indentation.",9,{"inputs":[],"output":{"name":"self"}}],[11,"with_indent","","Construct a pretty printer formatter that uses the `indent` string for indentation.",9,null],[11,"open","","",9,null],[11,"comma","","",9,null],[11,"colon","","",9,null],[11,"close","","",9,null],[0,"value","serde_json","JSON Value",null,null],[3,"Serializer","serde_json::value","Create a `serde::Serializer` that serializes a `Serialize`e into a `Value`.",null,null],[3,"Deserializer","","Creates a `serde::Deserializer` from a `json::Value` object.",null,null],[4,"Value","","Represents a JSON value",null,null],[13,"Null","","Represents a JSON null value",10,null],[13,"Bool","","Represents a JSON Boolean",10,null],[13,"I64","","Represents a JSON signed integer",10,null],[13,"U64","","Represents a JSON unsigned integer",10,null],[13,"F64","","Represents a JSON floating point number",10,null],[13,"String","","Represents a JSON string",10,null],[13,"Array","","Represents a JSON array",10,null],[13,"Object","","Represents a JSON object",10,null],[5,"to_value","","Shortcut function to encode a `T` into a JSON `Value`",null,{"inputs":[{"name":"t"}],"output":{"name":"value"}}],[5,"from_value","","Shortcut function to decode a JSON `Value` into a `T`",null,{"inputs":[{"name":"value"}],"output":{"name":"result"}}],[8,"ToJson","","A trait for converting values to JSON",null,null],[10,"to_json","","Converts the value of `self` to an instance of JSON",11,null],[11,"eq","","",10,null],[11,"ne","","",10,null],[11,"clone","","",10,null],[11,"find","","If the `Value` is an Object, returns the value associated with the provided key.\nOtherwise, returns None.",10,null],[11,"find_path","","Attempts to get a nested Value Object for each key in `keys`.\nIf any key is found not to exist, find_path will return None.\nOtherwise, it will return the `Value` associated with the final key.",10,null],[11,"lookup","","**Deprecated**: Use `Value.pointer()` and pointer syntax instead.",10,null],[11,"pointer","","Looks up a value by a JSON Pointer.",10,null],[11,"search","","If the `Value` is an Object, performs a depth-first search until\na value associated with the provided key is found. If no value is found\nor the `Value` is not an Object, returns None.",10,null],[11,"is_object","","Returns true if the `Value` is an Object. Returns false otherwise.",10,null],[11,"as_object","","If the `Value` is an Object, returns the associated BTreeMap.\nReturns None otherwise.",10,null],[11,"as_object_mut","","If the `Value` is an Object, returns the associated mutable BTreeMap.\nReturns None otherwise.",10,null],[11,"is_array","","Returns true if the `Value` is an Array. Returns false otherwise.",10,null],[11,"as_array","","If the `Value` is an Array, returns the associated vector.\nReturns None otherwise.",10,null],[11,"as_array_mut","","If the `Value` is an Array, returns the associated mutable vector.\nReturns None otherwise.",10,null],[11,"is_string","","Returns true if the `Value` is a String. Returns false otherwise.",10,null],[11,"as_string","","If the `Value` is a String, returns the associated str.\nReturns None otherwise.",10,null],[11,"is_number","","Returns true if the `Value` is a Number. Returns false otherwise.",10,null],[11,"is_i64","","Returns true if the `Value` is a i64. Returns false otherwise.",10,null],[11,"is_u64","","Returns true if the `Value` is a u64. Returns false otherwise.",10,null],[11,"is_f64","","Returns true if the `Value` is a f64. Returns false otherwise.",10,null],[11,"as_i64","","If the `Value` is a number, return or cast it to a i64.\nReturns None otherwise.",10,null],[11,"as_u64","","If the `Value` is a number, return or cast it to a u64.\nReturns None otherwise.",10,null],[11,"as_f64","","If the `Value` is a number, return or cast it to a f64.\nReturns None otherwise.",10,null],[11,"is_boolean","","Returns true if the `Value` is a Boolean. Returns false otherwise.",10,null],[11,"as_boolean","","If the `Value` is a Boolean, returns the associated bool.\nReturns None otherwise.",10,null],[11,"is_null","","Returns true if the `Value` is a Null. Returns false otherwise.",10,null],[11,"as_null","","If the `Value` is a Null, returns ().\nReturns None otherwise.",10,null],[11,"serialize","","",10,null],[11,"deserialize","","",10,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"fmt","","Serializes a json value into a string",10,null],[11,"fmt","","Serializes a json value into a string",10,null],[11,"from_str","","",10,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"new","","Construct a new `Serializer`.",12,{"inputs":[],"output":{"name":"serializer"}}],[11,"unwrap","","Unwrap the `Serializer` and return the `Value`.",12,null],[11,"serialize_bool","","",12,null],[11,"serialize_i64","","",12,null],[11,"serialize_u64","","",12,null],[11,"serialize_f64","","",12,null],[11,"serialize_char","","",12,null],[11,"serialize_str","","",12,null],[11,"serialize_none","","",12,null],[11,"serialize_some","","",12,null],[11,"serialize_unit","","",12,null],[11,"serialize_unit_variant","","",12,null],[11,"serialize_newtype_variant","","",12,null],[11,"serialize_seq","","",12,null],[11,"serialize_tuple_variant","","",12,null],[11,"serialize_seq_elt","","",12,null],[11,"serialize_map","","",12,null],[11,"serialize_struct_variant","","",12,null],[11,"serialize_map_elt","","",12,null],[11,"new","","Creates a new deserializer instance for deserializing the specified JSON value.",13,{"inputs":[{"name":"value"}],"output":{"name":"deserializer"}}],[11,"deserialize","","",13,null],[11,"deserialize_option","","",13,null],[11,"deserialize_enum","","",13,null],[11,"deserialize_newtype_struct","","",13,null]],"paths":[[3,"ArrayBuilder"],[3,"ObjectBuilder"],[3,"Deserializer"],[3,"StreamDeserializer"],[4,"ErrorCode"],[4,"Error"],[8,"Formatter"],[3,"Serializer"],[3,"CompactFormatter"],[3,"PrettyFormatter"],[4,"Value"],[8,"ToJson"],[3,"Serializer"],[3,"Deserializer"]]}; initSearch(searchIndex);