-
Notifications
You must be signed in to change notification settings - Fork 8
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
Pospone discussion on "$" and "@" #9
Comments
Could you share any compelling use cases for these special features, to put them in context and to make it easier to understand them? This is up to your convenience but I'd suggest creating a separate issue for each. As to the title of this issue:
Exactly; that's also why we're not allowing
Yes, if a JSON-LD file author uses The graphs resulting from each of these files will be identical. I propose to use that as the main criterion. Ultimately, the purpose of all these It is also important to mention that JSON Schema I posted some additional thoughts at #11. |
I meant that if the problem is quoting, we could discuss with YAML folks and ask them to unreserve |
I took the liberty to ask in the issue referenced above. |
@ioggstream Thanks for this important issue! In fact you discuss several important issues, I wish you opened them as separate issues rather than under this unsexy title "postpone discussion"
Can you please elaborate on this? Is there any valid JSON that's invalid YAML? Cannot this
be written more simply as
AFAIK, JS programmers dislike punctuation in field names because they like to write |
In YAML 1.2, all valid JSON parses to valid YAML. When discussing with YAML folks, they told me that this cannot be guaranteed for YAML 1.3 and that you should parse JSON with JSON parsers, and YAML with YAML parser.
in yaml you cannot add "," at the end. I think it's ok.
Being a pythonista, I like punctuation. Still, my experience suggests to stay away from this kind of issues when you work on an existing language and you are not the sole implementor of parsers and serializers :) |
Being a pythonista just like @ioggstream I am not very keen on Javascript but, after a brief test, it appears that |
Closing as agreed by @ioggstream: this has a lot of great discussion but it's unfocused, so relevant stuff needs to be posted as distinct issues. |
Proposal
JSON-LD is complex. YAML is very complex and - as the YAML community says - it's a live specification that is undergoing
continuous revisions. For example:
<<:
have not been replaced by new ones, so implementers still support them;In this context, focusing on switching "@" with "$" to avoid quoting could lead to a dead end e.g. this is both valid in YAML and JSON, and it's just the first example that come to my mind
I'd focus on YAML structure
imho I would focus:
on supporting existing use cases, starting with the simple, interoperable conversion of JSON -> YAML (see https://www.ietf.org/archive/id/draft-ietf-httpapi-yaml-mediatypes-01.html#name-interoperability-considerat)
on the benefit of using alias nodes
on possible usage of cycles in the YAML representation graph (this is not interoperable with JSON).
Once identified the relations with these specific YAML features, I think we will be ready tame things like tags (which are not very interoperable in the wild).
The ongoing work on YAML fragment identifiers could even provide further benefits since it can reference both JSON Paths and alias nodes.
My2¢,
R.
The text was updated successfully, but these errors were encountered: