toJSON and fromJSON should throw exceptions on errors

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.0.0
    • Affects Version/s: 1.0.0-rc0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      toJSON() should throw UnexpectedValueExceptions (just like toPHP()):

      • Could not read document from BSON reader
      • Reading document did not exhaust input buffer

      fromJSON() should throw an UnexpectedValueException on any error parsing the JSON. For now, it's suitable to simply report the bson_error_t message.

              Assignee:
              Jeremy Mikola
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: