- A Concurrent Affair - https://www.concurrentaffair.org -

Escaping in JSON Pointers

Do you guys want to know how to refer to the /instances node under paths using a JSON pointer?


~1 is the escape sequence for /. And ~0 is the escape sequence for ~. I’m really learning more than I want to know.

Why ~ and not \, for example? Okay, maybe you don’t want to have a third escape sequence, \\ to denote \. But then, why not ~~ for ~ and ~/ for /?

I guarantee you, I will never be able to remember if ~1 is slash or tilde.


[1] [2]Share [3]