Extended JSON $date incorrectly parses integer literals

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.3.0
    • Component/s: JSON & ExtJSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The $date format requires a string or a $numberLong, but the driver incorrectly parses integer literals like the following:

      {"":{"$date":1}}
      0f0000000900010000000000000000
      
      {"":{"$date":-1}}
      0f0000000900ffffffffffffffff00
      

      N.B. floats do error:

      {"":{"$date":1.23}}
      unmarshal error: $date value should be string or object, but instead is double
      

            Assignee:
            Divjot Arora (Inactive)
            Reporter:
            David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: