The OpenD Programming Language

IonValueStream.serialize

struct IonValueStream
const scope const @safe
void
serialize
(
S
)
(
scope ref S serializer
)

Parameters

serializer S

serializer

Examples

import mir.ser.json;
const ubyte[] data = [0xe0, 0x01, 0x00, 0xea, 0xe9, 0x81, 0x83, 0xd6, 0x87, 0xb4, 0x81, 0x61, 0x81, 0x62, 0xd6, 0x8a, 0x21, 0x01, 0x8b, 0x21, 0x02];
auto json = data.IonValueStream.serializeJson;
assert(json == `{"a":1,"b":2}`);

Meta