Replies: 1 comment 1 reply
-
To date, no such reference format exists within the TOML standard. If it did exist, it would exist outside of the standard, and could be an application of the standard. We want to keep TOML as simple as possible. If you want to implement a pointer-style system, you could express a pointer, by your own standards, within a TOML string; and then later, you can interpret those pointer strings in your TOML document to navigate your own table hierarchy. That's basically how JSON Pointer uses JSON anyway. See RFC 6901 for details. Section 5 shows how pointers can be defined within strings in JSON. That doesn't make pointers part of JSON. It just shows that pointers can be expressed in JSON and then subsequently be treated as references by other tools, because your application expects to find and use pointer strings in that way. |
Beta Was this translation helpful? Give feedback.
-
In the JSON land, it's common to have URL values, which sometimes are resolved to references into JSON objects. Common example is the "$ref": "URL", which will use the '#fragment' with JSON pointer format: "http://site.com/foo/bar.json#my/object".
Is there any standard/proposal to have this as built-in type, distinct from the string. In particular, If there is standard way to refer to other part of the document, it will be possible to create "reusable" parts, similar in spirit to what's being used in JSON schema:
Which will result in tweety.type.legs == 2, and sooby_doo.type.tail == true
Beta Was this translation helpful? Give feedback.
All reactions