Re: [community-group] Clarification needed for custom properties in tokens (#174)

One could argue that could be allowed now since all of the spec's properties now begin with a `$`. Right now, when parsing a token file from the root, we know that any node that has a (direct child) property called `$value` is a token, and otherwise it's a group. To support extension properties without putting them in a specific `$extensions` node, parsers would need to make the group parsing a little more complex: they wouldn't know if any given child is a group or an extension property until searching that entire subtree for a property on any descendant with a name starting with `$`.

In addition to being annoying for parsers, I *think* that kind of openness would also limit what JSON Schema-based tooling could do with the files. But it does seem like something that *could* be allowed now that the spec properties all start with `$`.

Using a different prefix to denote "this is neither a token nor a group nor a property defined in the spec," like say `~`, would have roughly the same benefits with a lot less complexity.

-- 
GitHub Notification of comment by TravisSpomer
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/174#issuecomment-1276696097 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 12 October 2022 20:25:39 UTC