Crate json_value

Source
Expand description

§Json Helper Functions

§Methods

FunctionDescription
get_key_TGet a reference to the specified key, or a reference if successful
mut_key_TGet mutable reference to the specified key, or a mutable reference if successful
extract_TExtract the specified field, if successful, the field will disappear
is_TCheck if the object is the specified type
as_TGet a reference of the specified type, if successful, get a reference
into_TConvert to the specified type, if the failure data will disappear

Structs§

Error
This type represents all possible errors that can occur when serializing or deserializing JSON data.
Number
Represents a JSON number, whether integer or floating point.

Traits§

JsonMaybeArray
Treat json value as array and get data from it according to index
JsonMaybeObject
Treat json value as object and get data from it according to key
JsonValueCheck
Check the type of json value
JsonValueWrap
Attempt to convert json value to specified type

Functions§

to_string_pretty
Serialize a [JsonValue] into a String with pretty formatting.

Type Aliases§

JsonObject
Represents any valid JSON object.
JsonValue
Represents any valid JSON value.