Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-225

mongo::fromjson does not support outermost arrays

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: legacy-0.0-26compat-2.6.0, legacy-0.8.0
    • Fix Version/s: legacy-0.11.0
    • Component/s: BSON
    • Labels:

      Description

      If you have a JSON string with an outermost array (e.g. "[1,2,3]"), you cannot pass it to mongo::fromjson, as it expects an outermost object.

      This is a bit unfortunate, given that the underlying JParse can certainly handle it, and there can be an optional boolean to say whether it is an array or not.

      Again, happy to submit a PR if that will help move this along.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: