Skip to content

Compacted form for the "Serialize RDF as JSON-LD Algorithm" #659

@multimeric

Description

@multimeric

In Section 8.4 we have the RDF to JSON-LD algorithm, which specifies that it outputs "a JSON-LD document in expanded form". The issue with this is that users may prefer a compact serialisation, and it seems sub-optimal to first serialise to expanded form and then compact it. Therefore, I wonder if it would be possible for the spec to either rewrite this algorithm to have a configurable form, or alternatively to include a compact serialisation algorithm that is an explicit alternative. In either case, compact form serialisation would require not only the RDF graph but also the context.

Python's rdflib already broadly implements this by allowing context and/or auto_compact arguments to be passed to the serialiser, but I find it strange that this is not specified in the spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Discuss-Call

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions