Enum TokenType
- Namespace
- ShapeShift
- Assembly
- ShapeShift.dll
The kinds of token an IDecoder reports, which is the vocabulary every format-neutral converter dispatches on.
public enum TokenType
Fields
Binary = 9Binary data, for formats that carry bytes natively.
Boolean = 8A Boolean.
EndDocument = 10No further token: the input has been fully consumed.
A decoder reports this rather than throwing, so a caller may always ask what comes next -- which is exactly what a loop reading a stream of concatenated top-level values needs to do.
EndMap = 1The end of the innermost open map.
EndVector = 3The end of the innermost open vector.
Null = 5An explicit null.
Number = 7A number of any width, integral or otherwise.
PropertyName = 4The name of the map entry whose value comes next.
StartMap = 0The beginning of a map: a sequence of property-name/value pairs.
StartVector = 2The beginning of a vector: an ordered sequence of values.
String = 6Text.
Remarks
The set is deliberately small: it names only the distinctions a converter must be able to make without knowing which format it is reading. A format that cannot make one of them (for example a text format with no binary family) maps its values onto whichever member it can honestly report, and declares the limitation to its conformance adapter.