{"id":18174460,"url":"https://github.com/ropensci/jsonld","last_synced_at":"2026-02-19T02:32:45.478Z","repository":{"id":60722833,"uuid":"75742807","full_name":"ropensci/jsonld","owner":"ropensci","description":"R wrapper for jsonld.js JavaScript library","archived":false,"fork":false,"pushed_at":"2024-10-03T12:53:08.000Z","size":381,"stargazers_count":35,"open_issues_count":12,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-21T20:32:14.229Z","etag":null,"topics":["json-ld","r","r-package","rstats"],"latest_commit_sha":null,"homepage":"https://docs.ropensci.org/jsonld","language":"R","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/ropensci.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-06T15:10:25.000Z","updated_at":"2025-10-06T09:20:20.000Z","dependencies_parsed_at":"2024-11-02T16:08:31.582Z","dependency_job_id":"4f0ff41f-9260-4e05-a68a-e4c84f2926ed","html_url":"https://github.com/ropensci/jsonld","commit_stats":{"total_commits":45,"total_committers":3,"mean_commits":15.0,"dds":0.0444444444444444,"last_synced_commit":"7f05f66e3781b7f962402370dfb1fae59bf6e045"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ropensci/jsonld","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fjsonld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fjsonld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fjsonld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fjsonld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ropensci","download_url":"https://codeload.github.com/ropensci/jsonld/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fjsonld/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29601091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T00:59:38.239Z","status":"online","status_checked_at":"2026-02-19T02:00:07.702Z","response_time":117,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-ld","r","r-package","rstats"],"created_at":"2024-11-02T16:03:07.485Z","updated_at":"2026-02-19T02:32:45.434Z","avatar_url":"https://github.com/ropensci.png","language":"R","funding_links":[],"categories":["Programming","R"],"sub_categories":["R"],"readme":"# jsonld\n\n\u003e JSON for Linking Data\n\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![Build Status](https://app.travis-ci.com/ropensci/jsonld.svg?branch=master)](https://app.travis-ci.com/ropensci/jsonld)\n[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/ropensci/jsonld?branch=master\u0026svg=true)](https://ci.appveyor.com/project/jeroen/jsonld)\n[![Coverage Status](https://codecov.io/github/ropensci/jsonld/coverage.svg?branch=master)](https://app.codecov.io/github/ropensci/jsonld?branch=master)\n[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/jsonld)](https://cran.r-project.org/package=jsonld)\n[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/jsonld)](https://cran.r-project.org/package=jsonld)\n[![Github Stars](https://img.shields.io/github/stars/ropensci/jsonld.svg?style=social\u0026label=Github)](https://github.com/ropensci/jsonld)\n\n\nJSON-LD is a light-weight syntax for expressing linked data. It is primarily\nintended for web-based programming environments, interoperable web services and for \nstoring linked data in JSON-based databases. This package provides bindings to the \nJavaScript library for converting, expanding and compacting JSON-LD documents.\n\n## Hello World\n\n\n\nExample from https://github.com/digitalbazaar/jsonld.js#quick-examples. Example data:\n\n\n```r\ndoc \u003c- '{\n  \"http://schema.org/name\": \"Manu Sporny\",\n  \"http://schema.org/url\": {\"@id\": \"http://manu.sporny.org/\"},\n  \"http://schema.org/image\": {\"@id\": \"http://manu.sporny.org/images/manu.png\"}\n}'\n\ncontext \u003c- '{\n  \"name\": \"http://schema.org/name\",\n  \"homepage\": {\"@id\": \"http://schema.org/url\", \"@type\": \"@id\"},\n  \"image\": {\"@id\": \"http://schema.org/image\", \"@type\": \"@id\"}\n}'\n```\n\n### Compact and expand:\n\n\n```r\n(out \u003c- jsonld_compact(doc, context))\n```\n\n```\n{\n  \"@context\": {\n    \"name\": \"http://schema.org/name\",\n    \"homepage\": {\n      \"@id\": \"http://schema.org/url\",\n      \"@type\": \"@id\"\n    },\n    \"image\": {\n      \"@id\": \"http://schema.org/image\",\n      \"@type\": \"@id\"\n    }\n  },\n  \"image\": \"http://manu.sporny.org/images/manu.png\",\n  \"name\": \"Manu Sporny\",\n  \"homepage\": \"http://manu.sporny.org/\"\n} \n```\n\n```r\n(expanded \u003c- jsonld_expand(out))\n```\n\n```\n[\n  {\n    \"http://schema.org/url\": [\n      {\n        \"@id\": \"http://manu.sporny.org/\"\n      }\n    ],\n    \"http://schema.org/image\": [\n      {\n        \"@id\": \"http://manu.sporny.org/images/manu.png\"\n      }\n    ],\n    \"http://schema.org/name\": [\n      {\n        \"@value\": \"Manu Sporny\"\n      }\n    ]\n  }\n] \n```\n\n### Convert between JSON and RDF:\n\n\n```r\ncat(nquads \u003c- jsonld_to_rdf(doc))\n```\n\n```\n_:b0 \u003chttp://schema.org/image\u003e \u003chttp://manu.sporny.org/images/manu.png\u003e .\n_:b0 \u003chttp://schema.org/name\u003e \"Manu Sporny\" .\n_:b0 \u003chttp://schema.org/url\u003e \u003chttp://manu.sporny.org/\u003e .\n```\n\n```r\njsonld_from_rdf(nquads)\n```\n\n```\n[\n  {\n    \"@id\": \"_:b0\",\n    \"http://schema.org/image\": [\n      {\n        \"@id\": \"http://manu.sporny.org/images/manu.png\"\n      }\n    ],\n    \"http://schema.org/name\": [\n      {\n        \"@value\": \"Manu Sporny\"\n      }\n    ],\n    \"http://schema.org/url\": [\n      {\n        \"@id\": \"http://manu.sporny.org/\"\n      }\n    ]\n  }\n] \n```\n\n### Other utilities:\n\n\n```r\njsonld_flatten(doc)\n```\n\n```\n[\n  {\n    \"@id\": \"_:b0\",\n    \"http://schema.org/image\": [\n      {\n        \"@id\": \"http://manu.sporny.org/images/manu.png\"\n      }\n    ],\n    \"http://schema.org/name\": [\n      {\n        \"@value\": \"Manu Sporny\"\n      }\n    ],\n    \"http://schema.org/url\": [\n      {\n        \"@id\": \"http://manu.sporny.org/\"\n      }\n    ]\n  }\n] \n```\n\n```r\ncat(jsonld_normalize(doc, algorithm = 'URDNA2015', format = 'application/nquads'))\n```\n\n```\n_:c14n0 \u003chttp://schema.org/image\u003e \u003chttp://manu.sporny.org/images/manu.png\u003e .\n_:c14n0 \u003chttp://schema.org/name\u003e \"Manu Sporny\" .\n_:c14n0 \u003chttp://schema.org/url\u003e \u003chttp://manu.sporny.org/\u003e .\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fropensci%2Fjsonld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fropensci%2Fjsonld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fropensci%2Fjsonld/lists"}