Am Wed, 08 Feb 2012 20:49:48 -0600 schrieb "Robert Jacques" <[email protected]>: > > Speaking as the one proposing said Json replacement, I'd like to > point out that JSON strings != UTF strings: manual conversion is > required some of the time. And I use appender as a dynamic buffer in > exactly the manner you suggest. There's even an option to use a > string cache to minimize total memory usage. (Hmm... that > functionality should probably be re-factored out and made into its > own utility) That said, I do end up doing a bunch of useless encodes > and decodes, so I'm going to special case those away and add slicing > support for strings. wstrings and dstring will still need to be > converted as currently Json values only accept strings and therefore > also Json tokens only support strings. As a potential user of the > sax/pull interface would you prefer the extra clutter of special side > channels for zero-copy wstrings and dstrings?
BTW: Do you know DYAML? https://github.com/kiith-sa/D-YAML I think it has a pretty nice DOM implementation which doesn't require any changes to phobos. As YAML is a superset of JSON, adapting it for std.json shouldn't be too hard. The code is boost licensed and well documented. I think std.json would have better chances of being merged into phobos if it didn't rely on changes to std.variant.
