-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added example for sorting keys #1421
added example for sorting keys #1421
Conversation
example/sortkeys/sortkeys.cpp
Outdated
using namespace rapidjson; | ||
using namespace std; | ||
|
||
void printIt(Document &doc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const Value&
is sufficient
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good info 👍
example/sortkeys/sortkeys.cpp
Outdated
@@ -0,0 +1,70 @@ | |||
#define RAPIDJSON_HAS_STDSTRING 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it may be better to have this example without using std::string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed std::string
It still cannot compile. Due to not supporting pre-C++11? |
I am compiling it as per instructions here: https://github.com/Tencent/rapidjson#installation output:
|
We needed a way to sort keys and lost a day to find out how to do it. That is why we are contributing back to this awesome library with an example