Skip to content

Instantly share code, notes, and snippets.

@bithavoc
Created January 29, 2014 13:20
Show Gist options
  • Select an option

  • Save bithavoc/8687758 to your computer and use it in GitHub Desktop.

Select an option

Save bithavoc/8687758 to your computer and use it in GitHub Desktop.
/*
* http://johan.heapsource.com
*/
import std.stdio;
import std.json;
void main() {
JSONValue v = parseJSON(q{
{"a":2, "b":{"c":20}}
});
string str = toJSON(&v, true);
writeln(str);
}
// (Output)
/*
{
"a": 2,
"b": {
"c": 20
}
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment