Skip to content

Option to specify level of compaction for literals & resources #33

@azaroth42

Description

@azaroth42

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"}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions