Crate lil_json

Crate lil_json 

Source

Structs§

JsonArray
JsonObject represents an RFC 8259 JSON Array. It wraps a mutable or immutable buffer of JSON values. The easiest way to use it is through the ArrayJsonArray type alias, however you can use JsonArray directly to wrap your own buffer like a heap allocated Vec.
JsonField
a field within a JSON object
JsonObject
JsonObject represents an RFC 8259 JSON Object. It wraps a mutable or immutable buffer of object fields. The easiest way to use it is through the ArrayJsonObject type alias, however you can use JsonObject directly to wrap your own buffer like a heap allocated Vec

Enums§

JsonParseFailure
the various reasons parsing JSON can fail
JsonValue
terminal (non-nested) JSON types
ParseBuffer
a buffer that any sized type can be written to. ParseBuffer::Infinite is only available with the alloc feature enabled.
StringBuffer
a buffer that string slices can be written to

Constants§

EMPTY_FIELD
a default JSON field with static lifetime. equivalent to JsonField::new("", JsonValue::Null)
EMPTY_VALUE
a default JSON value with static lifetime. equivalent to JsonValue::Null.

Traits§

FieldBuffer
trait for all optionally mutable collection of JSON object fields
FieldBufferMut
trait for a mutable collection of JSON object fields
StringWrite
trait for types that JSON can be serialized into. mainly meant for internal usage.
ValueBuffer
trait for an optionally mutable collection of JSON array values
ValueBufferMut
trait for a mutable collection of JSON array values

Functions§

parse_json_array
the core function that powers parsing in the JsonArray API. It attempts to parse the fields of a json object from the provided data slice into the provided parse buffer. returns (num bytes consumed,num values parsed) on success
parse_json_object
the core function that powers parsing in the JsonObject API. It attempts to parse the fields of a json object from the provided data slice into the provided parse buffer. returns (num bytes consumed,num fields parsed) on success
serialize_json_array
the core function that powers serialization in the JsonArray API. It attempts to serialize the provided values as a JSON array into the provided output & returns the number of bytes written on success.
serialize_json_object
the core function that powers serialization in the JsonObject API. It attempts to serialize the provided fields as a JSON object into the provided output, & returns the number of bytes written on success.

Type Aliases§

AllocEscapeBuffer
a buffer for an growable string escape buffer. enabled with alloc feature.
ArrayJsonArray
ArrayJsonObject is a type alias for a JsonObject that wraps an array. It has extra functionality when compared to any other type of JsonObject.
ArrayJsonObject
ArrayJsonObject is a type alias for a JsonObject that wraps an array. It has extra functionality when compared to any other type of JsonObject.