Closed Jermolene closed 1 year ago
what do you get with
/ --> ?
/two/1 --> ?
I'm not sure if I'm reading the spec right, but it looks like /
would be treated the same as an empty string, and refer to the entire JSON object.
/two/1
would give {"third":"fourth"}
(ie it would return an object, not a string).
Just did crossread the spec. .. I think it would be nice to reference data-tiddlers that way. so +1 :)
@Skeeve may be interested?
Broken link it OP is: https://datatracker.ietf.org/doc/html/rfc6901 now
@Jermolene ... Since we have the new JSON-operatos in v5.3.0 imo this issue is obsolete and should be closed
Thanks @pmario
The existing RFC 6901 provides a standard way to encode pointers that de-reference items within a JSON object:
http://tools.ietf.org/html/rfc6901
The format is pretty simple (apart from the inevitable encoding gotchas). Pointers are a list of tokens each preceded by
/
. The remainder of each token gives the property name or array index of the ancestor items.For example, given this JSON:
The following references resolve as follows:
We could adopt this syntax in a more or less backwards compatible way.