Throw for EJSON.serialize(cursor)

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Minor - P4
    • 2.4.0
    • Affects Version/s: None
    • Component/s: Shell API
    • None
    • 2
    • Iteration Venus
    • Not Needed
    • Developer Tools

      In conjunction with NODE-6708, we could use the toJSON() method to throw a better exception when a user attempts to serialize a cursor with JSON.stringify(), EJSON.stringify() and friends, pointing them at the fact that they likely want to call .toArray() first.

      We can do this independently of NODE-6708 and only test it with JSON.stringify() until that ticket has been addressed.

              Assignee:
              Alena Khineika
              Reporter:
              Anna Henningsen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: