Converts the next part of the stream into JSON deserializable into an object
If the object is a zero-arg struct, this method will return
Ok(Some("null")) without looking at the stream.
Otherwise, it will try to convert the next
TokenTree in the stream.
If end of stream has been reached, this method returns
The JSON string should be deserializable into an object of type
Default object syntax:
- An enum is represented as
(enum_variant_snake_case <arg1> <arg2> ..), unless it is a unit enum, in which case it can also be represented as
enum_variant_snake_case. Enums can have optional arguments, which should all come at the end.
- A struct is represented as
(<arg1> <arg2> ..), unless it has no arguments, in which case it is represented by the empty string.
- A vec or tuple is represented as
[<elem1> <elem2> ..]
- None/null is represented as
- true (resp. false) is represented as
- Strings are represented as
"something with quotations".
- A numeric value like -1 or 1.1 is represented as is.
- You can delimit arguments and elements using whitespace and/or commas.
ctx will extend and/or override the default syntax.