Special characters (also nodes containing /
)
#193
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.
I added tests for handling of special characters - like slashes, quotes, and unicode - in element names, paths, and values. Everything - except of one case - was working but now we know for sure 😃
The special case is a slash in an element name that has sub-objects:
"contains/slash": "test"
is ok, but"contains/slash": { "test": 1 }
is not. As suggested in #169, I replaced the slash with atab
. Parsing now works well 👍For methods that require a path as input, we could either leave it as is and remember to use a tab there, too, or we pre-process the input.
I would go for the middle case and not worry about the parameters. It will be a rare case anyway.
Closes #169.