The JSON to convert
A buffer that will receive the Ion binary data
import mir.test; import mir.appender : scopedBuffer; static immutable ubyte[] data = [0xe0, 0x01, 0x00, 0xea, 0xe9, 0x81, 0x83, 0xd6, 0x87, 0xb4, 0x81, 0x62, 0x81, 0x61, 0xd6, 0x8b, 0x21, 0x01, 0x8a, 0x21, 0x02]; auto buf = scopedBuffer!ubyte; json2ion(` { "a" : 1, "b" : 2 } `, buf); buf.data.should == data;
Convert an JSON value to a Ion Value Stream.
This function is the @nogc version of json2ion.