NaN and Infinity differently JSON-encoded depending on platform

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • 1.7.0
    • Affects Version/s: None
    • Component/s: json, libbson
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In GCC and Clang, the double NAN (defined in math.h) is JSON-encoded like:

      {"value": nan}
      

      In Microsoft Visual Studio, it's:

      {"value": -nan(ind)}
      

      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.

              Assignee:
              A. Jesse Jiryu Davis
              Reporter:
              A. Jesse Jiryu Davis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: