Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: reserve $$ or $- for non-JRI keywords #6

Open
DavidBiesack opened this issue Oct 26, 2022 · 0 comments
Open

proposal: reserve $$ or $- for non-JRI keywords #6

DavidBiesack opened this issue Oct 26, 2022 · 0 comments
Labels
jri Related to the JRI (JSON Referencing and Identification) proposal

Comments

@DavidBiesack
Copy link

The proposal says:

JRI keywords MUST start with a "$" character. Context specifications MAY define their own "$"-prefixed keywords, however this is NOT RECOMMENDED as future specifications that extend JRI as discussed in {{extending}} will use that prefix.

I propose that the proposal extend to allow $$ as a safe prefix that will never be used by JRI.

For example, I may choose to define an object with "$ref": , "$$ref-prod": , "$$ref-qa":, in source to allow specifying alternates URIs , where preprocessing tools on the source can hot-swap $ref and $$ref-prod or $$ref-qa alternatives within a build/deploy pipeline. This could be used where static template or other token substitution does not work well.

Context specifications MAY safely use the "$$" prefix sequence for context keywords. Future JRI keywords MUST NOT start with the "$$" prefix sequence.

(Given that, the proposal could tighten this and say that Context specifications MAY NOT define their own "$"-prefixed keyword unless they use the "$$" prefix.)

@handrews handrews added the jri Related to the JRI (JSON Referencing and Identification) proposal label Oct 26, 2022
@handrews handrews changed the title proposal: reserve $$ or $- for non-JRY keywords proposal: reserve $$ or $- for non-JRI keywords Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jri Related to the JRI (JSON Referencing and Identification) proposal
Projects
None yet
Development

No branches or pull requests

2 participants