The JSON RFC that arrays are valid top-level JSON objects:
A JSON text is a sequence of tokens. The set of tokens includes six structural characters, strings, numbers, and three literal names. A JSON text is a serialized object or array. JSON-text = object / array
This ticket is for adding the ability to test for and parse arrays in strings as well as the ability to print them. Example usage:
StringData json("[ 123, \"abc\", ... ]"); if (isArray(json)) { BSONArray arr = fromjson(json); std::cout << printjson(arr) << std::endl; }
- is depended on by
-
CXX-264 Merge upstream changes for SERVER-14357
- Closed