Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3812

bson_as_json outputs illegal JSON for some locales

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      Many of the bson_as_json visitor functions delegate the work of converting a non-string value to a string to printf (by way of bson_string_append_printf). In certain locales, printf can return strings where a number with a floating point uses a comma instead of a period:

      { "value" : { "$numberDouble" : "1,1000000000000000888" } }
      

      JSON does not accept comma separators in numeric types, only decimal point separators.

            Assignee:
            roberto.sanchez@mongodb.com Roberto Sanchez
            Reporter:
            samantha.ritter@mongodb.com Samantha Ritter (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: