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

mongo::fromjson does not support outermost arrays

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

      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.

            Assignee:
            tyler@10gen.com Tyler Brock
            Reporter:
            itay Itay Neeman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: