Expand description
Classification of bytes withing JSON quote sequences.
Provides the QuoteClassifiedBlock struct and QuoteClassifiedIterator trait
that allow effectively enriching JSON inputs with quote sequence information.
The output of quote classification is an iterator of QuoteClassifiedBlock
which contain bitmasks whose lit bits signify characters that are within quotes
in the source document. These characters need to be ignored.
Note that the actual quote characters are not guaranteed to be classified as “within themselves” or otherwise. In particular the current implementation marks opening quotes with lit bits, but closing quotes are always unmarked. This behavior should not be presumed to be stable, though, and can change without a major semver bump.
Structs§
- Quote
Classified Block - Input block with a bitmask signifying which characters are within quotes.
- Resumed
Quote Classifier - Result of resuming quote classification, the resulting iterator and optionally the first block (already quote classified).
Traits§
- Inner
Iter - Higher-level classifier that can be consumed to retrieve the inner
Input::BlockIterator. - Quote
Classified Iterator - Trait for quote classifier iterators, i.e. finite iterators
enriching blocks of input with quote bitmasks.
Iterator is allowed to hold a reference to the JSON document valid for
'a.
Type Aliases§
- Quote
Iter Result - Result of the
FallibleIteratorfor quote classification, and of theoffsetfunction.