Toml: Object references in TOML

Created on 5 Feb 2020  路  1Comment  路  Source: toml-lang/toml

Has any thought been given to including the JSON concept of a Reference into the TOML spec?

In my use case, would love to be able to treat TOML as a complete replacement of JSON, but that concept in JSON is important to maintain.

Most helpful comment

That concept of Reference isn't actually a part of the core JSON spec (i.e. ECMA-404), but an add-on that can be expressed in JSON and interpreted by a parser that can do JSON References.

The TOML spec is like ECMA-404, in that it's all about the core language. References could be done similarly to how they're done in JSON, like so:

[external]
"$ref" = "http://some/where"

A TOML references spec, if one were made, wouldn't belong to the core TOML spec, though. It would be a complementary specification.

>All comments

That concept of Reference isn't actually a part of the core JSON spec (i.e. ECMA-404), but an add-on that can be expressed in JSON and interpreted by a parser that can do JSON References.

The TOML spec is like ECMA-404, in that it's all about the core language. References could be done similarly to how they're done in JSON, like so:

[external]
"$ref" = "http://some/where"

A TOML references spec, if one were made, wouldn't belong to the core TOML spec, though. It would be a complementary specification.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ChristianSi picture ChristianSi  路  4Comments

keiichiiownsu12 picture keiichiiownsu12  路  4Comments

uvtc picture uvtc  路  3Comments

paiden picture paiden  路  3Comments

clarfonthey picture clarfonthey  路  4Comments