Json unicode escape && preserveOrder keys sync#2145
Merged
aleks-f merged 7 commits intopocoproject:developfrom Feb 8, 2018
aleks-f:json-unicode-escape
Merged
Json unicode escape && preserveOrder keys sync#2145aleks-f merged 7 commits intopocoproject:developfrom aleks-f:json-unicode-escape
aleks-f merged 7 commits intopocoproject:developfrom
aleks-f:json-unicode-escape
Conversation
Member
aleks-f
commented
Feb 7, 2018
- JSON Stringify Unicode Escape functionality breaking change with 1.8.0 JSON Stringify Unicode Escape functionality breaking change with 1.8.0 #2137
- JSON::Object preserveOrder keys not synced on assignment JSON::Object preserveOrder keys not synced on assignment #2142
obiltschnig
reviewed
Feb 8, 2018
JSON/include/Poco/JSON/Object.h
Outdated
| typedef std::vector<std::string> NameList; | ||
|
|
||
| explicit Object(bool preserveInsertionOrder = false); | ||
| explicit Object(bool preserveInsertionOrder = false, bool escapeUnicode = false); |
Member
There was a problem hiding this comment.
Maybe we should think about introducing an options enum for the various places where we use preserveInsertionOrder and escapeUnicode, and use an int options instead of a potentially growing list of bool args. If we just change the Object constructor to:
Object(int options = 0);
and define:
enum Options
{
JSON_OPT_PRESERVE_INSERTION_ORDER = 1,
JSON_OPT_ESCAPE_UNICODE = 2
};
Then the new constructor taking int will be backwards compatible to the one taking bool.
Contributor
|
This looks great, thanks again! |
Bjoe
pushed a commit
to Bjoe/poco
that referenced
this pull request
Feb 19, 2018
* Only escape compulsory characters for JSON by default * add enable/disable unicode escaping flags to stringify pocoproject#2137 * JSON::Object preserveOrder keys not synced on assignment pocoproject#2142 * fix assignment preserveOrder and add object copy tests * add object move tests * fix comment * enum for JSON::Object options
Lloyd-Pottiger
added a commit
to Lloyd-Pottiger/poco
that referenced
this pull request
Sep 24, 2024
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
JaySon-Huang
pushed a commit
to pingcap/poco
that referenced
this pull request
Sep 24, 2024
* Pick pocoproject#2145 Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com> * Pick pocoproject#2153 Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com> --------- Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.