[CDRIVER-1978] NaN and Infinity differently JSON-encoded depending on platform Created: 04/Jan/17 Updated: 03/May/17 Resolved: 28/Feb/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | json, libbson |
| Affects Version/s: | None |
| Fix Version/s: | 1.7.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| 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 | ||
| Epic Link: | libbson corpus |
| Description |
|
In GCC and Clang, the double NAN (defined in math.h) is JSON-encoded like:
In Microsoft Visual Studio, it's:
This is seems wrong and likely violates the Extended JSON Spec. Furthermore, Infinity is encoded as "inf" with GCC and Clang on Linux and Mac, but "Infinity" with GCC on Solaris. |
| Comments |
| Comment by Githook User [ 24/Feb/17 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: Also standardize parsing of "NaN" and fix |
| Comment by A. Jesse Jiryu Davis [ 17/Jan/17 ] |
|
Waiting for Extended JSON Spec, including its tests. |