The OpenD Programming Language

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
deprecated IonErrorCode describe(IonDescribedValue value)

Describes value (nothrow version).

describe
IonDescribedValue describe()

Describes value.

serialize
void serialize(S serializer)

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