std.json: SkipWhitespace = false ?

Sean Kelly sean at invisibleduck.org
Thu Sep 20 15:09:16 PDT 2012


On Sep 19, 2012, at 1:07 PM, Peter Sommerfeld <noreply at rubrica.at> wrote:

> Hi Everyone!
> 
> I'm new to :D and have a small problem with std.json.
> 
> If I use parseJSON() or toJSON() all whitespaces are
> removed. I would like it to have them preserved for
> better readability for users.
> 
> In std.json.d various functions contain SkipWhitespace
> as parameter but that is not propagated to the toplevel
> functions.
> 
> Are there any strong reasons for this behavior or can
> I rebuild it with SkipWhitespace = true? Or is there
> another way to work around it.

It sounds like what you really want is pretty printing from toJSON.  It's really not too hard to add, and I'd like it too.  I think this will have to wait for the new std.json, whenever we get that though.


More information about the Digitalmars-d-learn mailing list