Keys within extended JSON should not require quotation marks

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor - P4
    • 4.7.0
    • Affects Version/s: 3.5.0
    • Component/s: JSON
    • None
    • None
    • Fully Compatible
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      A JSON document like

      {
         operationTime : {$timestamp : {t : 40, i : 20}
      }
      

      should parse even though the "t" and "i" fields are unquoted. In 3.5 it throws an exception:

      org.bson.json.JsonParseException: JSON reader expected a string but found 't'.
      
      	at org.bson.json.JsonReader.readStringFromExtendedJson(JsonReader.java:1126)
      	at org.bson.json.JsonReader.visitTimestampExtendedJson(JsonReader.java:1146)
      	at org.bson.json.JsonReader.visitExtendedJSON(JsonReader.java:626)
      	at org.bson.json.JsonReader.readBsonType(JsonReader.java:148
      

            Assignee:
            Unassigned
            Reporter:
            Jeffrey Yemin
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: