[CDRIVER-2128] Support revised Extended JSON spec Created: 17/Apr/17 Updated: 08/Jan/18 Resolved: 11/Jul/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | json, libbson |
| Affects Version/s: | 1.7.0 |
| Fix Version/s: | 1.7.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
We're rethinking the MongoDB Extended JSON spec. libbson is among the first of our drivers to complete an implementation; luckily we haven't released it yet. Disable or revert the Extended JSON changes in libbson. |
| Comments |
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: JSON syntax Extended JSON spec prohibits it, only {"$date": "2017-06-07T12:34:45"}or {"$date": {"$numberLong": "12345"}} are allowed. | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: Implement the "degenerate_extjson" portion of the tests. | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: A change in the Extended JSON Spec. | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: Branch:master | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: Ensure that the regex option flags "ilmsux" are stored in sorted order, | ||||||||||||
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] | ||||||||||||
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: Ensure that the regex option flags "ilmsux" are stored in sorted order, | ||||||||||||
| Comment by A. Jesse Jiryu Davis [ 11/Jul/17 ] | ||||||||||||
|
Master: https://github.com/mongodb/libbson/commit/f9c179bbc0fe6049a73a46abac2fc3e27c832393 r1.7: https://github.com/mongodb/libbson/commit/ff66b1907c3e2bf608980c289381a0e3cf2afbf2 | ||||||||||||
| Comment by Githook User [ 11/Jul/17 ] | ||||||||||||
|
Author: {u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}Message: Expect failure in regex flag test pending | ||||||||||||
| Comment by Githook User [ 11/Jul/17 ] | ||||||||||||
|
Author: {u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}Message: Extended JSON output for libbson changed in | ||||||||||||
| Comment by Jeremy Mikola [ 10/Jul/17 ] | ||||||||||||
|
jesse: I believe I found one more outstanding error with 1.7.0-rc0. mongodb/specifications#161 includes the following test case in source/bson-corpus/tests/regex.json:
Using the included bsonview utility, we have the following representations of canonical_bson and degenerate_bson, respectively:
The guide for BSON corpus spec tests includes the following:
Since this isn't a lossy test, we should expect the degenerate extended JSON string to produce canonical BSON. Based on my testing, bson_init_from_json() fails to alphabetize the regex flags and produces the degenerate BSON instead. | ||||||||||||
| Comment by A. Jesse Jiryu Davis [ 27/Jun/17 ] | ||||||||||||
|
I've completed the main changes. We now also parse and generate $regularExpression, while still parsing the old $regex format. Still todo: parse and generate this new Binary format:
We'll maintain the code that parses the old format:
I hear from Jeff that the Java driver will follow the same path. | ||||||||||||
| Comment by A. Jesse Jiryu Davis [ 18/Jun/17 ] | ||||||||||||
|
Blocked waiting for Jeff to propose a change to $regex syntax. | ||||||||||||
| Comment by A. Jesse Jiryu Davis [ 17/Jun/17 ] | ||||||||||||
|
We've caught up to the current Extended JSON Spec and its tests. I'm keeping this open until I hear what jeff.yemin@mongodb.com wants to change about $regex parsing and generation. | ||||||||||||
| Comment by A. Jesse Jiryu Davis [ 05/May/17 ] | ||||||||||||
|
Blocked on revised Extended JSON spec. |