Expand description
Types and functions for parsing JSON in a flexible and pedantic manner.
Modules§
- decode
- A
WarningKindfor warnings that can happen when decoding a JSON&str. - parser
- A JSON parse built to keep track of where each element came from in the input.
- write
- Tools for writing JSON.
Structs§
- ElemId
- A simple integer index used to ID the given
Elementwithin a JSON file. - Element
- A JSON
Elementcomposed of aPathand it’s [Value]. - Error
- A parsing Error that keeps track of the token being parsed when the Error occurred and the slice of JSON surrounding the Error location.
- Error
Report - A more comprehensive report on the
Errorusing the source JSON&strto provide human readable context. - LineCol
- A file location expressed as line and column.
- Path
- A path to a JSON
Elementwhere the path components are heap allocated and so do not require a lifetime back to the source JSON&str. - Path
Component - A single component of a
PathRef. - Path
Components - An
Iteratorover the components of a path. - PathRef
- A path to a JSON
Elementwhere the path components are borrowed from the source JSON&str. - Unexpected
Fields - A collection of paths that were unexpected according to the schema used while parsing the JSON for an OCPI object.
- Unexpected
Fields Into Iter - Unexpected
Fields Iter - An
Iteratorover each unexpected field as aPathRef.
Enums§
- Path
Node Kind - A light weight enum used to indicate the kind of component being visited when using the
PathComponentsIterator. - Source
Str - Value
Kind - A light-weight type identity for a JSON
Value’s content.
Functions§
- line_
col - Return the line and column indices of the end of the slice.