IonValue

Ion Value

The type descriptor octet has two subfields: a four-bit type code T, and a four-bit length L.

       7       4 3       0
      +---------+---------+
value |    T    |    L    |
      +---------+---------+======+
      :     length [VarUInt]     :
      +==========================+
      :      representation      :
      +==========================+

Members

Functions

describe
IonDescribedValue describe(IonErrorCode error)
Undocumented in source. Be warned that the author may not have intended to support it.
describe
IonDescribedValue describe()

Describes value.

describe
deprecated IonErrorCode describe(IonDescribedValue value)

Describes value (nothrow version).

serialize
void serialize(S serializer)

Variables

data
const(ubyte)[] data;
Undocumented in source.

Examples

import mir.lob;
import mir.ion.type_code;
import mir.ion.value;
// null.string
assert(IonValue([0x9F]).describe.get!IonNull == IonNull(IonTypeCode.clob));
// empty string
assert(IonValue([0x90]).describe.get!Clob.data == "");

assert(IonValue([0x95, 0x63, 0x6f, 0x76, 0x69, 0x64]).describe.get!Clob.data == "covid");
import mir.lob;
import mir.ion.type_code;
import mir.ion.value;
// null.string
assert(IonValue([0xAF]).describe.get!IonNull == IonNull(IonTypeCode.blob));
// empty string
assert(IonValue([0xA0]).describe.get!Blob.data == "");

assert(IonValue([0xA5, 0x63, 0x6f, 0x76, 0x69, 0x64]).describe.get!Blob.data == "covid");

Meta