groupon/cson-safe — pull request #9 by johan (2014-11-29 06:09:43+00:00)
Title: A nicer CSON.stringify

Feature request:

* have `CSON.stringify` produce safe CSON that looks nicer than native JSON
* add minimal `json2cson` tool that does the same, given valid JSON or CSON

Still handles all the same features as `JSON.stringify` does, and gracefully handles weird inputs the same way (slightly better, actually; if you tell it to indent with your own name, it'll omit non-CSON-indentation-characters).

The main difference between this cson output, and what the `cson` package's json2cson spits out (also, what prompted this pull request) are the object literals: this codec will never omit the curly braces, thus producing:

```cson
[
{
}
]