Structs§
- Escape
Error - Escaped
Str - New-type around
&str
that indicates the string is an escaped JSON string. Provides functions for retrieving the string in either form. - Offset
- Represents the location of a token
Enums§
- Token
- Enum representing the different JSON tokens that can be returned by
crate::deserialize::json_token_iter
.
Functions§
- expect_
blob_ or_ null - Expects a Token::ValueString or Token::ValueNull. If the value is a string, it interprets it as a base64 encoded [Blob] value.
- expect_
bool_ or_ null - Expects a Token::ValueBool or Token::ValueNull, and returns the bool value if it’s not null.
- expect_
document - Expects and parses a complete document value.
- expect_
number_ or_ null - Expects a Token::ValueString, Token::ValueNumber or Token::ValueNull.
- expect_
start_ array - Expects a Token::StartArray token and returns an error if it’s not present.
- expect_
start_ object - Expects a Token::StartObject token and returns an error if it’s not present.
- expect_
string_ or_ null - Expects a Token::ValueString or Token::ValueNull, and returns the EscapedStr value if it’s not null.
- expect_
timestamp_ or_ null - Expects a Token::ValueNull, Token::ValueString, or Token::ValueNumber depending
on the passed in
timestamp_format
. If there is a non-null value, it interprets it as an [DateTime
] in the requested format. - skip_
to_ end - Assumes a start object/array token has already been consumed and skips tokens until until its corresponding end object/array token is found.
- skip_
value - Skips an entire value in the token stream. Errors if it isn’t a value.