{"id":18695797,"url":"https://github.com/rdflib/rdflib-jsonld","last_synced_at":"2025-05-16T14:08:23.477Z","repository":{"id":2382236,"uuid":"3347689","full_name":"RDFLib/rdflib-jsonld","owner":"RDFLib","description":"JSON-LD parser and serializer plugins for RDFLib","archived":false,"fork":false,"pushed_at":"2021-12-17T19:54:53.000Z","size":421,"stargazers_count":285,"open_issues_count":46,"forks_count":71,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-04-03T10:13:00.822Z","etag":null,"topics":["json","json-ld","parser","python","rdf","serializer"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RDFLib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-03T19:46:36.000Z","updated_at":"2025-03-09T15:48:34.000Z","dependencies_parsed_at":"2022-08-06T12:15:16.738Z","dependency_job_id":null,"html_url":"https://github.com/RDFLib/rdflib-jsonld","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RDFLib%2Frdflib-jsonld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RDFLib%2Frdflib-jsonld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RDFLib%2Frdflib-jsonld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RDFLib%2Frdflib-jsonld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RDFLib","download_url":"https://codeload.github.com/RDFLib/rdflib-jsonld/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248564657,"owners_count":21125408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","json-ld","parser","python","rdf","serializer"],"created_at":"2024-11-07T11:16:16.854Z","updated_at":"2025-04-12T11:48:01.191Z","avatar_url":"https://github.com/RDFLib.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RDFLib plugin providing JSON-LD parsing and serialization\n\n## ARCHIVED\n*This [rdflib](https://pypi.org/project/rdflib/) plugin is deprecated\nfor, as of the 2021-09-17 release of rdflib 6.0.1, JSON-LD handing has been\nintegrated. All functionality in this package has been removed, as of release 0.6.2.*\n\n*This plugin is now 'tombstoned' meaning this - 0.6.2 - is a final release and\nall users of Python \u003e 3.6 are encouraged to move to rdflib \u003e 6.0.1.*\n\n*If you are forced to keep using Python \u003c= 3.6, you will need to keep using release \u003c= 0.5.0 of this plugin with RDFlib 5.0.0.*\n\n----\n\nThis is an implementation of [JSON-LD](http://www.w3.org/TR/json-ld/)\nfor [RDFLib](https://github.com/RDFLib/rdflib).\nFor more information about this technology, see the [JSON-LD website](http://json-ld.org/).\n\nThis implementation will:\n\n- read in an JSON-LD formatted document and create an RDF graph\n- serialize an RDF graph to JSON-LD formatted output\n\n\n## Installation\n\nThe easiest way to install the RDFLib JSON-LD plugin is directly from PyPi using pip by running the command below:\n\n```shell\npip install rdflib-jsonld\n```\n\nOtherwise you can download the source and install it directly by running:\n\n```shell\npython setup.py install\n```\n\n\n## Using the plug-in JSONLD serializer/parser with RDFLib\n\nThe plugin parser and serializer are automatically registered if installed by\nsetuptools.\n\n```python\n\u003e\u003e\u003e from rdflib import Graph, plugin\n\u003e\u003e\u003e from rdflib.serializer import Serializer\n\n\u003e\u003e\u003e testrdf = \"\"\"\n... @prefix dcterms: \u003chttp://purl.org/dc/terms/\u003e .\n... \u003chttp://example.org/about\u003e\n...     dcterms:title \"Someone's Homepage\"@en .\n... \"\"\"\n\n\u003e\u003e\u003e g = Graph().parse(data=testrdf, format='n3')\n\n\u003e\u003e\u003e print(g.serialize(format='json-ld', indent=4))\n{\n    \"@id\": \"http://example.org/about\",\n    \"http://purl.org/dc/terms/title\": [\n        {\n            \"@language\": \"en\",\n            \"@value\": \"Someone's Homepage\"\n        }\n    ]\n}\n\n\u003e\u003e\u003e context = {\"@vocab\": \"http://purl.org/dc/terms/\", \"@language\": \"en\"}\n\u003e\u003e\u003e print(g.serialize(format='json-ld', context=context, indent=4))\n{\n    \"@context\": {\n        \"@language\": \"en\",\n        \"@vocab\": \"http://purl.org/dc/terms/\"\n    },\n    \"@id\": \"http://example.org/about\",\n    \"title\": \"Someone's Homepage\"\n}\n```\n\n\u003c!-- CUT HERE --\u003e\n\u003c!-- Text after this comment won't appear on PyPI --\u003e\n\n## Building the Sphinx documentation\n\nIf Sphinx is installed, Sphinx documentation can be generated with:\n\n```shell\n$ python setup.py build_sphinx\n```\n\nThe documentation will be created in ./build/sphinx.\n\n\n## Continuous integration tests\n\n[![Build Status](https://travis-ci.org/RDFLib/rdflib-jsonld.svg?branch=master)](https://travis-ci.org/RDFLib/rdflib-jsonld)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdflib%2Frdflib-jsonld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frdflib%2Frdflib-jsonld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdflib%2Frdflib-jsonld/lists"}