ion2jsonPretty

Converts Ion Value Stream data to JSON text

The function performs data.IonValueStream.serializeJsonPretty.

@safe pure
string
ion2jsonPretty
(
scope const(ubyte)[] data
)

Examples

static immutable ubyte[] data = [0xe0, 0x01, 0x00, 0xea, 0xe9, 0x81, 0x83, 0xd6, 0x87, 0xb4, 0x81, 0x61, 0x81, 0x62, 0xd6, 0x8a, 0x21, 0x01, 0x8b, 0x21, 0x02];
assert(data.ion2jsonPretty == "{\n\t\"a\": 1,\n\t\"b\": 2\n}");
// static assert(data.ion2jsonPretty == "{\n\t\"a\": 1,\n\t\"b\": 2\n}");

Meta