-
Notifications
You must be signed in to change notification settings - Fork 34
method to require {"id": "uri"} resource compaction result #6
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
Comments
👍 to this issue. Being able to generate consistent JSON is valuable for many scenarios, including Elastic as mentioned. It means that consuming systems need much less type checking or pre-processing. |
This may effectively be a duplicate of #3. No flags required. |
Agreed. Let's leave both open until both are satisfied, hopefully by the same solution? |
WG resolved that the use case for #3 and #6 are important, and should have a single solution to be discussed in a separate combined issue: #33 |
Issue: The compaction algorithm prefers the most compact format, which for resources without relationships is a string containing the URI. This causes problems in systems that cannot handle arrays of mixed data types (for example ElasticSearch) when there are also resources that have relationships, resulting in both objects and strings in the same array.
For example:
would raise an error in Elastic.
Proposed solution: Provide a flag to the compaction algorithm to signal that the resulting JSON should always create objects for resources, even if there is only the URI available. This would instead render the example above as an array of objects:
Original issue: JSON-LD 1.1: method to require {"id": "uri"} resource compaction result #507.
The text was updated successfully, but these errors were encountered: