std.xml and Adam D Ruppe's dom module

Johannes Pfau nospam at
Thu Feb 9 03:13:52 PST 2012

Am Wed, 08 Feb 2012 20:49:48 -0600
schrieb "Robert Jacques" <sandford at>:
> 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?

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

I think std.json would have better chances of being merged into phobos
if it didn't rely on changes to std.variant.

More information about the Digitalmars-d mailing list