Closed glyn closed 2 years ago
@cabo Do you know how to fix the rendering? E.g. I think it would be better not to split the lines in the middle of a quoted string, but splitting after ]
would be ok.
Please check my little tweak to #192
What if we reduce each aspect to minimal necessary ... ?
{
"o": {"j j":1, "k.k": 3},
"o": {"j j":1, "k.k": 3},
"a": ["a","b"],
"'": {"@": 2}
}
Query | Result | Result Paths | Comment |
---|---|---|---|
$.o['j j'] |
1 |
$['o']['j j'] |
Named value in nested object |
$.o["j j"] |
1 |
$['o']['j j'] |
Named value in nested object |
$.o['k.k'] |
3 |
$['o']['k.k'] |
Named value in nested object |
$.o["k.k"] |
3 |
$['o']['k.k'] |
Named value in nested object |
This seems to work ...
`$.o['j` `j']['k.k']`
This is essentially what https://github.com/ietf-wg-jsonpath/draft-ietf-jsonpath-base/pull/192/commits/bae20c2c657e01b9b17a186d73258e976cc10d44 does, except that it uses native nbsps.
ahh ... fine ...
There are two considerations I have in mind:
Left an editing note.
Copy/paste works for me in TXT (which has an ASCII space) and HTML (which has an NBSP, but that gets reduced in copy/paste).
Fixed as part of e82ce1f521e94ee2cd5b93d14726875e94a4a8e7.
Some of these are split across lines in awkward places:
We could either fix the rendering somehow to split at a more acceptable point or change the examples to avoid these awkward splits.