Bson JsonReader failed to parse the date time string "2011-01-14T00:00:00.000-0800"

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Using BSON JsonReader to parse below JSON string got JsonParseException with error message "Failed to parse string as a date",  but this JSON string can be imported successfully using mongoimport. It looks like JsonReader using java8 java.time.format.DataFormatter.ISO_OFFSET_DATE_TIME to parse java string, is it possible to extend the the pattern to be more flexible?

      {
          "_id": 1,
          "title": "Unlocking Android",
          "isbn": "1933988673",
          "pageCount": 416,
          "publishedDate": {
              "$date": "2009-04-01T00:11:00-0800"
          }
      }
      

       

       

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

              Created:
              Updated:
              Resolved: