digitalmars.D.learn - std.json: SkipWhitespace = false ?
- Peter Sommerfeld (12/12) Sep 19 2012 Hi Everyone!
- Jesse Phillips (6/18) Sep 19 2012 Save a copy of it locally and make the changes needed. There is a
- Peter Sommerfeld (3/25) Sep 19 2012 Thanks Jesse, will do so!
- Sean Kelly (5/20) Sep 20 2012 It sounds like what you really want is pretty printing from toJSON. =
- Peter Sommerfeld (3/6) Sep 20 2012 Agreed! Where can the version be seen which are on review ?
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. Peter
Sep 19 2012
On Wednesday, 19 September 2012 at 20:06:31 UTC, Peter Sommerfeld 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. PeterSave a copy of it locally and make the changes needed. There is a new version of std.json which is waiting on changes to std.variant and review... Anyway not much will happen with the current version so this will be good anyway.
Sep 19 2012
Jesse Phillips wrote:Peter Sommerfeld wrote:Thanks Jesse, will do so! PeterHi 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. PeterSave a copy of it locally and make the changes needed. There is a new version of std.json which is waiting on changes to std.variant and review... Anyway not much will happen with the current version so this will be good anyway.
Sep 19 2012
On Sep 19, 2012, at 1:07 PM, Peter Sommerfeld <noreply rubrica.at> = wrote:Hi Everyone! =20 I'm new to :D and have a small problem with std.json. =20 If I use parseJSON() or toJSON() all whitespaces are removed. I would like it to have them preserved for better readability for users. =20 In std.json.d various functions contain SkipWhitespace as parameter but that is not propagated to the toplevel functions. =20 Are there any strong reasons for this behavior or can I rebuild it with SkipWhitespace =3D 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.=
Sep 20 2012
Sean Kelly wrote: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.Agreed! Where can the version be seen which are on review ? Peter
Sep 20 2012