Permalink
Browse files

Fix invalid literal value in docs and remove old rdfextras plugin usage

  • Loading branch information...
1 parent 3563caf commit 1a58cbdf3fc52081bde1bbf677eff68f497e6b1c @niklasl niklasl committed May 15, 2016
Showing with 4 additions and 12 deletions.
  1. +2 −6 docs/jsonld-parser.rst
  2. +2 −6 docs/jsonld-serializer.rst
@@ -8,18 +8,14 @@ Using the plug-in JSONLD parser with RDFLib
---------------------------------------------
The plugin serializer is automatically registered if installed by
-setuptools, otherwise call ``rdfextras.registerplugins()`` after
-importing, as shown below.
+setuptools.
Identify a source of JSON-LD, pass the source to the parser,
manipulate the resulting graph.
.. code-block:: python
>>> from rdflib import Graph, URIRef, Literal
- >>> from rdflib.parser import Parser
- >>> import rdfextras
- >>> rdfextras.registerplugins() # if no setuptools
>>> test_json = '''
... {
... "@context": {
@@ -30,7 +26,7 @@ manipulate the resulting graph.
... "@id": "http://example.org/about",
... "dc:title": {
... "@language": "en",
- ... "@literal": "Someone's Homepage"
+ ... "@value": "Someone's Homepage"
... }
... }
... '''
@@ -8,17 +8,13 @@ Using the plug-in JSONLD serializer with RDFLib
------------------------------------------------
The plugin serializer is automatically registered if installed by
-setuptools, otherwise call ``rdfextras.registerplugins()`` after
-importing, as shown below.
+setuptools.
Read in an RDFLib Graph and serialize it, specifying ``format='json-ld'``.
.. code-block:: python
>>> from rdflib import Graph, plugin
- >>> from rdflib.serializer import Serializer
- >>> import rdfextras
- >>> rdfextras.registerplugins()
>>> testrdf = '''
... @prefix dc: <http://purl.org/dc/terms/> .
@@ -38,7 +34,7 @@ Read in an RDFLib Graph and serialize it, specifying ``format='json-ld'``.
"@id": "http://example.org/about",
"dc:title": {
"@language": "en",
- "@literal": "Someone's Homepage"
+ "@value": "Someone's Homepage"
}
}

0 comments on commit 1a58cbd

Please sign in to comment.