• Deebster@programming.dev
    link
    fedilink
    arrow-up
    8
    ·
    3 months ago

    If you need to refer to a key with ~ or / in its name, you must escape the characters with ~0 and ~1 respectively. For example, to get “baz” from { “foo/bar~”: “baz” } you’d use the pointer /foo1bar0.

    I guess they’re using ~ for escaping since backslash is already escaping text content, not that you’d see it very often in keys.

    Having magic values instead of using ~~ and ~/ feels ugly.