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

XMLWordPrintableJSON

    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
              Reporter:
              Kræn Hansen
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: