Table of Contents

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 = 9

Binary data, for formats that carry bytes natively.

Boolean = 8

A Boolean.

EndDocument = 10

No 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 = 1

The end of the innermost open map.

EndVector = 3

The end of the innermost open vector.

Null = 5

An explicit null.

Number = 7

A number of any width, integral or otherwise.

PropertyName = 4

The name of the map entry whose value comes next.

StartMap = 0

The beginning of a map: a sequence of property-name/value pairs.

StartVector = 2

The beginning of a vector: an ordered sequence of values.

String = 6

Text.

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.