Skip to content
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

Adjusted usage of cJSON to improve compliance and performance results. #70

Merged
merged 1 commit into from
Oct 10, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/tests/cjsontest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class CjsonTest : public TestBase {
virtual ParseResultBase* Parse(const char* json, size_t length) const {
(void)length;
CjsonParseResult* pr = new CjsonParseResult;
pr->root = cJSON_Parse(json);
pr->root = cJSON_ParseWithOpts(json,0,1);
if (!pr->root) {
delete pr;
return 0;
Expand All @@ -86,7 +86,7 @@ class CjsonTest : public TestBase {
virtual StringResultBase* Stringify(const ParseResultBase* parseResult) const {
const CjsonParseResult* pr = static_cast<const CjsonParseResult*>(parseResult);
CjsonStringResult* sr = new CjsonStringResult;
sr->s = cJSON_PrintUnformatted(pr->root);
sr->s = cJSON_PrintBuffered(pr->root,4096,0);
return sr;
}
#endif
Expand All @@ -95,7 +95,7 @@ class CjsonTest : public TestBase {
virtual StringResultBase* Prettify(const ParseResultBase* parseResult) const {
const CjsonParseResult* pr = static_cast<const CjsonParseResult*>(parseResult);
CjsonStringResult* sr = new CjsonStringResult;
sr->s = cJSON_Print(pr->root);
sr->s = cJSON_PrintBuffered(pr->root,4096,1);
return sr;
}
#endif
Expand Down