Bug #76216 | Version of rapidjson in extra/ directory is out of date and buggy | ||
---|---|---|---|
Submitted: | 9 Mar 2015 3:51 | Modified: | 13 Apr 2015 12:03 |
Reporter: | Justin Swanhart | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: Packaging | Severity: | S2 (Serious) |
Version: | 5.7.5 | OS: | Any |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[9 Mar 2015 3:51]
Justin Swanhart
[10 Mar 2015 12:17]
Erlend Dahl
Erik, can you please take a look?
[13 Mar 2015 12:03]
Erik Frøseth
The version of rapidjson bundled with MySQL does not support the "Key" callback function, so this is not a bug per se (see BaseReaderHandler in reader.h). The callback function for "Key" was introduced in rapidjson a few months after the version bundled with MySQL It is possible to differentiate between key and value by keeping track of the parser state. For instance, after each StartObject() the first value should always be a key/name. Something like this should get things started: struct Handler { bool expect_key = false; ... bool String(const char* str, SizeType length, bool copy) { if (expect_key) { cout << "Key(" << str << ")" << endl; expect_key = false; } else { cout << "String(" << str << ")" << endl; expect_key = true; } return true; } bool StartObject() { expect_key = true; return true; } ... };
[14 Apr 2015 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".