[Issue 17693] std.json cannot parse dub.json package files

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jul 26 02:01:52 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17693

Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #1 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
Fairly sure the JSON spec forbids trailing commas, so accepting them would
actually be violating the spec.

Although we could add an option to allow parsing trailing commas, it would make
much more sense to fix Dub instead.

Please file this at https://github.com/dlang/dub/issues ?

If you would like std.json to have an option to allow trailing commas, please
file a new issue, but I think it would need to have a much stronger
justification than just Dub allowing them.

As a workaround, I suggest that you use the same JSON parsing library in your
project that Dub uses. That should guarantee compatibility.

--


More information about the Digitalmars-d-bugs mailing list