[JAVA-1398] JsonWriter produces invalid output for Longs under JsonMode.STRICT Created: 19/Aug/14 Updated: 01/Apr/16 Resolved: 21/Aug/14 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | JSON |
| Affects Version/s: | None |
| Fix Version/s: | 3.0.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Robert Guo (Inactive) | Assignee: | Robert Guo (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | rc | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
The number should be quoted correctly: Currently:
Should be:
http://docs.mongodb.org/manual/reference/mongodb-extended-json/#numberlong This is causing the json to be incorrectly round tripped. |
| Comments |
| Comment by Jeffrey Yemin [ 31/Mar/15 ] | |||||||||||
|
Closing all resolved 3.0.0 issues, as 3.0.0 has been tagged and released. | |||||||||||
| Comment by Githook User [ 30/Jan/15 ] | |||||||||||
|
Author: {u'username': u'guoyr', u'name': u'Robert Guo', u'email': u'robert.guo@10gen.com'}Message: Fix number long extended json bug JsonWriter produced invalid output for longs under JsonMode.STRICT | |||||||||||
| Comment by Ross Lawley [ 21/Aug/14 ] | |||||||||||
|
Squashed and merged | |||||||||||
| Comment by Githook User [ 21/Aug/14 ] | |||||||||||
|
Author: {u'username': u'guoyr', u'name': u'Robert Guo', u'email': u'robert.guo@10gen.com'}Message: Fix number long extended json bug JsonWriter produced invalid output for longs under JsonMode.STRICT | |||||||||||
| Comment by Ross Lawley [ 20/Aug/14 ] | |||||||||||
|
Updated the Summary / Description it was: visitNumberLongExtendedJson should expect int or long, not String JSONScanner automatically converts long it to an int even though it's written as a string
JsonScanner.nextToken calls scanNumber if it sees a number, which returns an int32 or int64 |