[JAVA-131] Non-escaping backslash characters are not ignored when parsing JSON Created: 09/Jul/10 Updated: 29/Oct/10 Resolved: 09/Jul/10 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | 2.0 |
| Fix Version/s: | 2.1 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Ville Lautanala | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Mac OS X, Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065) |
||
| Backwards Compatibility: | Minor Change |
| 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 |