toPrettyJson

Serialize T to a pretty (indented) JSON string.

string
toPrettyJson
(
T
)
(
T v
)

Examples

	struct X { int a; string b; int[] c, d; }
	X x = {17, "aoeu", [1, 2, 3]};
	assert(toPrettyJson(x) ==
`{
	"a" : 17,
	"b" : "aoeu",
	"c" : [
		1,
		2,
		3
	],
	"d" : [
	]
}`, toPrettyJson(x));

Meta