RDFLib / rdflib-jsonld

JSON-LD parser and serializer plugins for RDFLib
Other
280 stars 71 forks source link

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

Open dbooth-boston opened 8 years ago

dbooth-boston commented 8 years ago

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 commented 8 years ago

This might actually be the result of issue #18

niklasl commented 8 years ago

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.)