Enum ObjectEncoding
- Namespace
- ShapeShift.Schema
- Assembly
- ShapeShift.dll
Enumerates the ways an ObjectContract may be encoded.
public enum ObjectEncoding
Fields
Map = 0The object is encoded as a map whose keys are the property names.
This is the default for every ShapeShift format because unrecognized properties can be ignored or retained, and properties can be added, removed, or reordered without invalidating existing payloads.
Positional = 1The object is encoded as a vector whose elements are identified by position rather than by name.
Positional encoding is more compact but strictly more version sensitive: each member's position is part of the contract forever, so positions may be appended and retired but never reused or reordered. A retired position is written as a null placeholder when a later position is still occupied.
Only positions after the last one a writer needs may be omitted (by writing a shorter vector), because a vector offers no way to say that an interior element is absent rather than null. See Position.