bson EJSON uses instanceof checks when it shouldn’t

XMLWordPrintableJSON

    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      This fails with EJSON but works with plain bson.serialize/deserialize:

      > require('bson').EJSON.serialize({re: /abc/})
      { re: { '$regularExpression': { pattern: 'abc', options: '' } } }
      > require('bson').EJSON.serialize({re: vm.runInNewContext('/abc/')})
      { re: {} }
      

      This is a shell GA blocker.

              Assignee:
              Durran Jordan
              Reporter:
              Anna Henningsen
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: