Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON-LD Integration #1354

Merged
merged 13 commits into from Jul 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -18,3 +18,4 @@ test_reports/*latest.ttl
# PyCharm
.idea/
prepare_changelog.sh
.venv/
3 changes: 1 addition & 2 deletions README.md
Expand Up @@ -138,8 +138,7 @@ See also [./examples](./examples)

## Features
The library contains parsers and serializers for RDF/XML, N3,
NTriples, N-Quads, Turtle, TriX, RDFa and Microdata. JSON-LD parsing/serializing can be achieved using the
[JSON-LD plugin](https://github.com/RDFLib/rdflib-jsonld).
NTriples, N-Quads, Turtle, TriX, JSON-LD, RDFa and Microdata.

The library presents a Graph interface which can be backed by
any one of a number of Store implementations.
Expand Down
6 changes: 3 additions & 3 deletions docs/index.rst
Expand Up @@ -8,8 +8,8 @@ RDFLib is a pure Python package for working with `RDF <http://www.w3.org/RDF/>`_

* **Parsers & Serializers**

* for RDF/XML, N3, NTriples, N-Quads, Turtle, TriX, RDFa and Microdata
* and JSON-LD, via a plugin module
* for RDF/XML, N3, NTriples, N-Quads, Turtle, TriX, JSON-LD, RDFa and Microdata


* **Store implementations**

Expand Down Expand Up @@ -130,4 +130,4 @@ Here are a few RDF and Python terms referred to in this documentation. They are
The Resource Description Framework (RDF) is a framework for representing information in the Web. RDF data is
stored in graphs that are sets of subject-predicate-object triples, where the elements may be IRIs, blank nodes,
or datatyped literals. See the `OWL 2 Web Ontology Language
Document Overview <http://www.w3.org/TR/owl-overview/>`_ for more info.
Document Overview <http://www.w3.org/TR/owl-overview/>`_ for more info.
21 changes: 21 additions & 0 deletions docs/upgrade5to6.rst
Expand Up @@ -16,6 +16,23 @@ compatible with. If you need very long-term backwards-compatibility or Python 2
Major Changes
-------------

The most notable changes in RDFLib 6.0.0 are:

Python 3.7+
^^^^^^^^^^^
* The oldest version of python you can use to run RDFLib is now 3.7.
* This is a big jump from RDFLib 5.0.0 that worked on python 2.7 and 3.5.
* This change is to allow the library maintainers to adopt more modern development tools,
newer language features, and avoid the need to support EOL versions of python in he future

JSON-LD integration and JSON-LD 1.1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* The json-ld serializer/parser plugin was by far the most commonly used RDFLib addon.
* Last year we brought it under the RDFLib org in Github
* Now for 6.0.0 release the JSON-LD serializer and parser are integrated into RDFLib core
* This includes the experimental support for the JSON-LD v1.1 spec
* You no longer need to install the json-ld dependency separately.


All Changes
-----------
Expand Down Expand Up @@ -56,3 +73,7 @@ Documentation Fixes:
^^^^^^^^^^^^^^^^^^^^
* Fix a doc string in the query module
`PR #976 <https://github.com/RDFLib/rdflib/pull/976>`_

Integrade JSON-LD into RDFLib:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`PR #1354 <https://github.com/RDFLib/rdflib/pull//1354>`_
7 changes: 7 additions & 0 deletions rdflib/plugin.py
Expand Up @@ -168,6 +168,10 @@ def plugins(name=None, kind=None):
register("ntriples", Serializer, "rdflib.plugins.serializers.nt", "NTSerializer")
register("nt", Serializer, "rdflib.plugins.serializers.nt", "NTSerializer")
register("nt11", Serializer, "rdflib.plugins.serializers.nt", "NT11Serializer")
register("json-ld", Serializer, "rdflib.plugins.serializers.jsonld", "JsonLDSerializer")
register(
"application/ld+json", Serializer, "rdflib.plugins.serializers.jsonld", "JsonLDSerializer"
)

# Register Quad Serializers
register(
Expand Down Expand Up @@ -198,6 +202,9 @@ def plugins(name=None, kind=None):
register("ntriples", Parser, "rdflib.plugins.parsers.ntriples", "NTParser")
register("nt", Parser, "rdflib.plugins.parsers.ntriples", "NTParser")
register("nt11", Parser, "rdflib.plugins.parsers.ntriples", "NTParser")
register("application/json+ld", Parser, "rdflib.plugins.parsers.jsonld", "JsonLDParser")
register("json-ld", Parser, "rdflib.plugins.parsers.jsonld", "JsonLDParser")


# Register Quad Parsers
register("application/n-quads", Parser, "rdflib.plugins.parsers.nquads", "NQuadsParser")
Expand Down