JSON serialization function with pretty formatting and custom output range.
JSON serialization function with pretty formatting.
static struct S { int a; } assert(S(4).serializeJsonPretty!" " == "{\n \"a\": 4\n}");
import mir.format: stringBuf; auto buffer = stringBuf; static struct S { int a; } serializeJsonPretty!" "(buffer, S(4)); assert(buffer.data == "{\n \"a\": 4\n}");
See Implementation
JSON serialization function with pretty formatting and custom output range.