[JAVA-2363] Properly verify the expected field names when parsing extended JSON Created: 14/Oct/16  Updated: 19/Oct/16  Resolved: 17/Oct/16

Status: Closed
Project: Java Driver
Component/s: JSON
Affects Version/s: None
Fix Version/s: 3.5.0

Type: Bug Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

A logic error in JsonReader causes it to not properly verify the expected field names for extended JSON documents which have unexpected field names. For example, the following JSON document should be rejected:

{ "$timestamp" : { "i" : 1, "t" : 1234 } }

because the extended JSON spec requires that the 't' field precedes the 'i' field. But due to this bug the 'i' field will be treated as the 't' field, and vice versa.

Expected result: JsonReader should throw a JsonParseException



 Comments   
Comment by Githook User [ 17/Oct/16 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-2363: Fix logic that verifies the contents of a string when reading JSON
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/c610f1853a4a3e9e5762e196adb076b647f418ac

Generated at Thu Feb 08 08:57:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.