-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Merging the almost-duplicate #3 and #6, which were accepted individually as use cases.
In order to ensure a particular JSON surface structure, where entries in an array are always presented as a JSON object regardless of whether it would be unambiguous to further compact the result, it is necessary to add a new feature to declare this type of compaction is desired.
For example, a resource where only the URI is known will compact to a single string when the context declares the property as @type: @id
. A literal that only has a value, and the language or data type are not declared, will compact to a JSON string or number.
Instead it should be possible to have the resource compact to:
{"@id": "uri"}
And the literal compact to:
{"@value": "value"}