Skip to content

Support for bad commas #1429

@nuzrub

Description

@nuzrub
  • Some of the projects I work on use man-made Jsons as config files. At start it is nice, then people start to forget some commas at the end of objects/arrays. When using Newtonsoft's Json.Net, it handles it gracefully, just ignoring. When using yours, it gives me an error. Thus, I have to correct some files from time to time so that they can be read.
    I love your lib and that feature would make my life easier.

  • A minimal Json with bad commas:

{
    "A": 10,
}
           /\ Bad Comma

As I see it, the comma puts the lib in a state where it expects some other member, but it gets a } instead. Thus, the grammar must be slightly altered to allow , } as just being a }. Same goes for ,] being threated as just a ]

Thanks for the Lib :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    solution: duplicatethe issue is a duplicate; refer to the linked issue insteadsolution: proposed fixa fix for the issue has been proposed and waits for confirmation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions