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

mongo::fromjson does not support outermost arrays

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • legacy-0.11.0
    • legacy-0.0-26compat-2.6.0, legacy-0.8.0
    • BSON

    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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: