{"id":37428120,"url":"https://github.com/dcdpr/jsonld-cpp-client","last_synced_at":"2026-01-16T06:32:35.229Z","repository":{"id":50553472,"uuid":"519421638","full_name":"dcdpr/jsonld-cpp-client","owner":"dcdpr","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-24T14:21:21.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-24T17:36:53.896Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcdpr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-30T04:52:42.000Z","updated_at":"2024-04-24T14:21:25.000Z","dependencies_parsed_at":"2023-01-18T02:31:12.557Z","dependency_job_id":null,"html_url":"https://github.com/dcdpr/jsonld-cpp-client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dcdpr/jsonld-cpp-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcdpr%2Fjsonld-cpp-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcdpr%2Fjsonld-cpp-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcdpr%2Fjsonld-cpp-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcdpr%2Fjsonld-cpp-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcdpr","download_url":"https://codeload.github.com/dcdpr/jsonld-cpp-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcdpr%2Fjsonld-cpp-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-16T06:32:35.145Z","updated_at":"2026-01-16T06:32:35.209Z","avatar_url":"https://github.com/dcdpr.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsonld-cpp-client\n\nThis is a simple client application for testing the [jsonld-cpp library](https://github.com/dcdpr/jsonld-cpp)\n\n## Building jsonld-cpp-client\n\nTo build jsonld-cpp-client, you will need:\n\n* cmake\n* g++, clang or Visual Studio (community edition)\n* [jsonld-cpp](https://github.com/dcdpr/jsonld-cpp) installed locally\n\njsonld-cpp-client uses a pretty standard cmake build system:\n\n```\nmkdir build\ncd build\ncmake ..\nmake\n```\n\nIf `jsonld-cpp` is not installed to a standard location, you will need to provide `cmake` with a prefix path:\n\n```\ncmake -DCMAKE_PREFIX_PATH=/tmp/jsonld-install ..\n```\n\n### Installing prerequisites\n\nIf the above build instruction don't work, you probably need to install some\nprerequisites. For example, on a fresh Debian Bullseye system:\n\n```\n$ sudo apt install make cmake gcc g++\n```\n\nAfter that, make sure you can build and install `jsonld-cpp`. See its [documentation](https://github.com/dcdpr/jsonld-cpp) for more details.\n\n## Samples\n\nThere are two command line applications included in jsonld-cpp-client and a couple of sample JSON-LD files to use.\n\n```shell\n\u003e cat ../samples/ex01a.jsonld\n```\n```json\n{\n  \"@context\": {\n    \"name\": \"http://xmlns.com/foaf/0.1/name\",\n    \"isKnownBy\": { \"@reverse\": \"http://xmlns.com/foaf/0.1/knows\", \"@container\": \"@index\" }\n  },\n  \"@id\": \"http://example.com/people/markus\",\n  \"name\": \"Markus Lanthaler\",\n  \"isKnownBy\": {\n    \"Dave\": {\n      \"@id\": \"http://example.com/people/dave\",\n      \"name\": \"Dave Longley\"\n    },\n    \"Gregg\": {\n      \"@id\": \"http://example.com/people/gregg\",\n      \"name\": \"Gregg Kellogg\"\n    }\n  }\n}\n```\n```shell\n\u003e cat ../samples/ex01b.jsonld\n```\n```json\n{ \"@context\": { \"name\": \"http://xmlns.com/foaf/0.1/name\", \"isKnownBy\": { \"@reverse\": \"http://xmlns.com/foaf/0.1/knows\", \"@container\": \"@index\" } }, \"@id\": \"http://example.com/people/markus\", \"isKnownBy\": { \"Dave\": { \"@id\": \"http://example.com/people/dave\", \"name\": \"Dave Longley\" }, \"Gregg\": { \"@id\": \"http://example.com/people/gregg\", \"name\": \"Gregg Kellogg\" } }, \"name\": \"Markus Lanthaler\" } \n```\n\n### expand-jsonld\n\n`expand-jsonld` will take a JSON-LD file and run the ['expansion'](https://www.w3.org/TR/json-ld-api/#expansion) algorithm. The expanded file will be output to the terminal.\n\n```shell\n\u003e ./expand-jsonld ../samples/ex01a.jsonld  | jq\n```\n```json\n[\n  {\n    \"@id\": \"http://example.com/people/markus\",\n    \"@reverse\": {\n      \"http://xmlns.com/foaf/0.1/knows\": [\n        {\n          \"@id\": \"http://example.com/people/dave\",\n          \"@index\": \"Dave\",\n          \"http://xmlns.com/foaf/0.1/name\": [\n            {\n              \"@value\": \"Dave Longley\"\n            }\n          ]\n        },\n        {\n          \"@id\": \"http://example.com/people/gregg\",\n          \"@index\": \"Gregg\",\n          \"http://xmlns.com/foaf/0.1/name\": [\n            {\n              \"@value\": \"Gregg Kellogg\"\n            }\n          ]\n        }\n      ]\n    },\n    \"http://xmlns.com/foaf/0.1/name\": [\n      {\n        \"@value\": \"Markus Lanthaler\"\n      }\n    ]\n  }\n]\n```\n\n\n### jsonld2rdf\n\n`jsonld2rdf` can convert a JSON-LD document into RDF data in NQuads format. This program first runs the ['expansion'](https://www.w3.org/TR/json-ld-api/#expansion) algorithm, then converts the JSON-LD to RDF using ['RDF serialization](https://www.w3.org/TR/json-ld-api/#rdf-serialization-deserialization). The RDF data will be output to the terminal.\n\n```shell\n\u003e ./jsonld2rdf ../samples/ex01a.jsonld\n```\n```\n\u003chttp://example.com/people/dave\u003e \u003chttp://xmlns.com/foaf/0.1/knows\u003e \u003chttp://example.com/people/markus\u003e .\n\u003chttp://example.com/people/dave\u003e \u003chttp://xmlns.com/foaf/0.1/name\u003e \"Dave Longley\" .\n\u003chttp://example.com/people/gregg\u003e \u003chttp://xmlns.com/foaf/0.1/knows\u003e \u003chttp://example.com/people/markus\u003e .\n\u003chttp://example.com/people/gregg\u003e \u003chttp://xmlns.com/foaf/0.1/name\u003e \"Gregg Kellogg\" .\n\u003chttp://example.com/people/markus\u003e \u003chttp://xmlns.com/foaf/0.1/name\u003e \"Markus Lanthaler\" .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcdpr%2Fjsonld-cpp-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcdpr%2Fjsonld-cpp-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcdpr%2Fjsonld-cpp-client/lists"}