Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-131

Non-escaping backslash characters are not ignored when parsing JSON

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.1
    • Affects Version/s: 2.0
    • Component/s: None
    • None
    • Environment:
      Mac OS X, Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
    • Minor Change

      When using the built-in JSON parser, single backslashes are included in the resulting string. This is especially annoying as some JSON libraries escape forward slashed with backslashes. According to JSON spec, "\/" is a valid escape characer (see: http://tech.groups.yahoo.com/group/json/message/249).

      For example, the literal string "va\lue" interpreted as "va\lue" but any sane JS interpreter parses it as "value".

      I've created a patch on GitHub, which makes the JSON parser behave like other JS interpreters. http://github.com/lautis/mongo-java-driver

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            lautis Ville Lautanala
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: