Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2613

strict parsing of extended JSON $numberInt reads value as string

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.0
    • Affects Version/s: bson-4.0.4
    • Component/s: None
    • None

      > EJSON.parse(`{"$numberInt":"1"}`);
      1
      > EJSON.parse(`{"$numberInt":"1"}`, { relaxed: false });
      Int32 { value: '1' }
      > 
      

      roundtripping this value will result in type loss

            Assignee:
            thomas.reggi@mongodb.com Thomas Reggi (Inactive)
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: