Last active
February 21, 2023 22:33
-
-
Save handrews/62d9ae0abe8938c910f7f4906cfa53f9 to your computer and use it in GitHub Desktop.
Additional Relative JSON Pointer examples for index manipulation
This file contains 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
[ | |
"foo", | |
"bar", | |
{"baz": "value"} | |
] |
This file contains 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
Starting value Relative JSON Pointer result | |
------------------------------------------------------------------------- | |
"foo" "0+1" "bar" | |
"bar" "0-1#" 0 | |
"foo" "0+2/baz" "value" | |
"value" "1-2" "foo" | |
"value" "1+1" << fail >> | |
"value" "0+1" << fail >> | |
"bar" "0-2" << fail >> | |
"foo" "1+1/2/baz" << fail >> | |
"foo" "0/anything" << fail >> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment