Java Driver
  1. Java Driver
  2. JAVA-131

Non-escaping backslash characters are not ignored when parsing JSON

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor - P4 Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Mac OS X, Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
    • Backward Breaking:
      Rarely
    • Operating System:
      ALL
    • # Replies:
      0
    • Last comment by Customer:
      true

      Description

      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

        Activity

        • Comments
        There are no comments yet on this issue.

          People

          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              3 years, 41 weeks, 5 days ago