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

EJSON.stringify(uuid) throws "Unrecognized or invalid _bsontype: UUID"

      Use Case

      As a developer on the Realm JS team
      I want to use EJSON.stringify to derive a string representation on a UUID
      So that I can pass partition values to the Realm Sync client.

      User Impact

      We're rewriting a part of our SDK so we have time for this to get fixed and there's a possible workaround. But any user trying to stringify a UUID is probably impacted.

      Dependencies

      • Downstream: The Realm JS SDK "bindgen" branch.

      Unknowns

      • None I can think of.

      Acceptance Criteria

      Implementation Requirements

      • Passing a UUID to EJSON.stringify should return a string instead of throwing.

      Testing Requirements

      const BSON = require("bson");
      const uuid = new BSON.UUID();
      const str = BSON.EJSON.stringify(uuid);
      // Assert something about the str

      Documentation Requirements

      • None.

      Follow Up Requirements

      • additional tickets to file, required releases, etc

            Assignee:
            Unassigned Unassigned
            Reporter:
            kraen.hansen@mongodb.com Kræn Hansen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: