serializeToJsonPretty

JSON serialization function with pretty formatting.

  1. string serializeToJsonPretty(V value)
    string
    serializeToJsonPretty
    (
    string sep = "\t"
    V
    )
    (
    auto ref V value
    )
  2. void serializeToJsonPretty(V value, O output)

Examples

import asdf;

static struct S { int a; }
assert(S(4).serializeToJsonPretty == "{\n\t\"a\": 4\n}");

Meta