D-Programming-Language/phobos — pull request #885 by beatgammit (2012-10-22 18:39:25+00:00)
Title: Added JSON marshal/unmarshal

**TL;DR:** adds marshalJSON and unmarshalJSON functions to `std.json` to mimic [Go's json library](http://golang.org/pkg/encoding/json/).

I've written what I feel are in-depth unit tests, but I'm sure I've missed some cases. All unit tests in phobos passed on my machine (Linux x86_64).

I noticed that orange is on the list of new standard library modules to be reviewed. I intend it to be used for simple data passing purposes, not full serialization. A separate JSON archiver should be implemented if orange is added.

There are some restrictions on what can and cannot be marshalled/unmarshalled in this implementation. I wasn't sure how to document those.