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

YAML 1.2 JSON vs YAML and "one-pass double-validation" #23

Closed
LLyaudet opened this issue Apr 1, 2016 · 2 comments
Closed

YAML 1.2 JSON vs YAML and "one-pass double-validation" #23

LLyaudet opened this issue Apr 1, 2016 · 2 comments

Comments

@LLyaudet
Copy link

@LLyaudet LLyaudet commented Apr 1, 2016

Hi,

You write "The order of alternatives inside a production is significant. [...]"
It appears that the JSON alternative is listed last in a few cases. Is-it intentional?
I thought that it would be listed first since it's more restrictive and it would enable "one-pass double-validation"
(the document is valid YAML 1.2 and is also valid JSON or not).
Example : rule [158] YAML is before JSON. However in "Example 7.23 Flow Content" the tokens are "legended/captioned" in priority with "c-flow-json-content(n,c)"
instead of "ns-flow-yaml-content(n,c)". idem for "Example 7.24 Flow Nodes".

Best regards,
Laurent Lyaudet

@orenbenkiki
Copy link
Member

@orenbenkiki orenbenkiki commented Apr 2, 2016

In this case it doesn't matter since you can tell by the 1st character whether something is a plain scalar; the order rule only applies when there's some element of choice.

Loading

@orenbenkiki orenbenkiki closed this Apr 2, 2016
@LLyaudet
Copy link
Author

@LLyaudet LLyaudet commented Apr 5, 2016

Hi,

Thanks for the precision.

Best regards,
Laurent Lyaudet

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants