rdflib-jsonld icon indicating copy to clipboard operation
rdflib-jsonld copied to clipboard

Example JSON-LD does not work -- bad @context?

Open dbooth-boston opened this issue 9 years ago • 2 comments

The example JSON-LD on page https://github.com/RDFLib/rdflib-jsonld/blob/master/docs/jsonld-parser.rst does not produce any RDF triples. Currently it is:

{
    "@context": {
        "dc": "http://purl.org/dc/terms/",
        "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
        "rdfs": "http://www.w3.org/2000/01/rdf-schema#"
    },
    "@id": "http://example.org/about",
    "dc:title": {
        "@language": "en",
        "@literal": "Someone's Homepage"
    }
}

It should be something like:

{
    "@context": {
        "@language": "en",
        "@vocab": "http://purl.org/dc/terms/"
    },
    "@id": "http://example.org/about",
    "title": "Someone's Homepage"
}

dbooth-boston avatar Jan 22 '16 13:01 dbooth-boston

This might actually be the result of issue #18

dbooth-boston avatar Jan 22 '16 13:01 dbooth-boston

It's actually because these rather outdated documents use the once-suggested @literal keyword, which in JSON-LD 1.0 is @value.

Need to update the documents. (Ideally avoiding duplicating the examples already in the module docstrings, e.g. by removing those in favor of the docs, as long as the docs are properly doctested.)

niklasl avatar Jan 22 '16 17:01 niklasl