Skip to content

string parser does not recognize uncompliant strings #12

Closed

Description

@nlohmann

The Readme currently states:

Furthermore, we allow for more escape symbols in strings as the JSON specification. While this may not be a problem in reality, we are aware of it, but as long as we have a hand-written parser, we won't invest too much to be fully compliant.

And in fact, anything between two unescaped quotes will be treated as strings. However, the JSON standard is very explicit how a string may look like:

As long as the class does not implement this string specification, the class is not fully JSON compliant.

Activity

  1. nlohmann commented on Jan 5, 2015

    @nlohmann
    OwnerAuthor

    The parser of https://github.com/dropbox/json11 could give some ideas how to write a compliant parser manually.

  2. nlohmann commented on Jan 6, 2015

    @nlohmann
    OwnerAuthor

    Also http://re2c.org may help (as pointed out by drac667).

  3. added a commit that references this issue on Jan 9, 2015
  4. nlohmann commented on Feb 18, 2015

    @nlohmann
    OwnerAuthor

    Fixed in latest commit: re2c is used.

  5. added a commit that references this issue on May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions