All Projects → lanthaler → Jsonld

lanthaler / Jsonld

Licence: mit
JSON-LD processor for PHP

Projects that are alternatives of or similar to Jsonld

Schema Dts
JSON-LD TypeScript types for Schema.org vocabulary
Stars: ✭ 338 (+20.71%)
Mutual labels:  schema-org, linked-data, json-ld, semantic-web
Pyld
JSON-LD processor written in Python
Stars: ✭ 413 (+47.5%)
Mutual labels:  linked-data, json-ld, semantic-web
twinql
A graph query language for the semantic web
Stars: ✭ 17 (-93.93%)
Mutual labels:  linked-data, semantic-web, json-ld
titanium-json-ld
A JSON-LD 1.1 Processor & API
Stars: ✭ 79 (-71.79%)
Mutual labels:  linked-data, semantic-web, json-ld
React Schemaorg
Type-checked Schema.org JSON-LD for React
Stars: ✭ 262 (-6.43%)
Mutual labels:  schema-org, json-ld, semantic-web
Jsonld.js
A JSON-LD Processor and API implementation in JavaScript
Stars: ✭ 1,212 (+332.86%)
Mutual labels:  linked-data, json-ld, semantic-web
YALC
🕸 YALC: Yet Another LOD Cloud (registry of Linked Open Datasets).
Stars: ✭ 14 (-95%)
Mutual labels:  linked-data, semantic-web, json-ld
Hypergraphql
GraphQL interface for querying and serving linked data on the Web.
Stars: ✭ 120 (-57.14%)
Mutual labels:  linked-data, json-ld, semantic-web
Hypergraphql
GraphQL interface for querying and serving linked data on the Web.
Stars: ✭ 112 (-60%)
Mutual labels:  linked-data, json-ld, semantic-web
Rdflib
RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.
Stars: ✭ 1,584 (+465.71%)
Mutual labels:  linked-data, json-ld, semantic-web
Php Json Ld
PHP implementation of a JSON-LD Processor and API
Stars: ✭ 246 (-12.14%)
Mutual labels:  linked-data, json-ld, semantic-web
jsonld-context-parser.js
Parses JSON-LD contexts
Stars: ✭ 20 (-92.86%)
Mutual labels:  linked-data, semantic-web, json-ld
autocomplete-semantic-web
Semantic Web Autocomplete for Atom Editor
Stars: ✭ 45 (-83.93%)
Mutual labels:  semantic-web, schema-org
carml
A pretty sweet RML engine, for RDF.
Stars: ✭ 74 (-73.57%)
Mutual labels:  linked-data, semantic-web
linkedresearch.org
🌐 linkedresearch.org
Stars: ✭ 32 (-88.57%)
Mutual labels:  linked-data, semantic-web
pyldn
A pythonic Linked Data Notifications (LDN) receiver
Stars: ✭ 13 (-95.36%)
Mutual labels:  linked-data, semantic-web
seomate
SEO, mate! It's important. That's why SEOMate provides the tools you need to craft all the meta tags, sitemaps and JSON-LD microdata you need - in one highly configurable, open and friendly package - with a super-light footprint.
Stars: ✭ 31 (-88.93%)
Mutual labels:  schema-org, json-ld
ngx-json-ld
📝 A small component to easily bind JSON-LD schema to Angular templates.
Stars: ✭ 29 (-89.64%)
Mutual labels:  schema-org, json-ld
CSV2RDF
Streaming, transforming, SPARQL-based CSV to RDF converter. Apache license.
Stars: ✭ 48 (-82.86%)
Mutual labels:  linked-data, semantic-web
jsonld-streaming-serializer.js
A fast and lightweight streaming JSON-LD serializer for JavaScript
Stars: ✭ 20 (-92.86%)
Mutual labels:  linked-data, json-ld

JsonLD Build Status

JsonLD is a fully conforming JSON-LD processor written in PHP. It is extensively tested and passes the official JSON-LD test suite.

There's an online playground where you can evaluate the processor's basic functionality.

Additionally to the features defined by the JSON-LD API specification, JsonLD supports framing (including value matching, deep-filtering, aggressive re-embedding, and named graphs) and an experimental object-oriented interface for JSON-LD documents.

Installation

The easiest way to install JsonLD is by requiring it with Composer.

composer require ml/json-ld

... and including Composer's autoloader to your project

require('vendor/autoload.php');

Of course, you can also download JsonLD as ZIP archive from Github.

JsonLD requires PHP 5.3 or later.

Usage

The library supports the official JSON-LD API as well as a object-oriented interface for JSON-LD documents (not fully implemented yet, see issue #15 for details).

All classes are extensively documented. Please have a look at the source code.

// Official JSON-LD API
$expanded = JsonLD::expand('document.jsonld');
$compacted = JsonLD::compact('document.jsonld', 'context.jsonld');
$framed = JsonLD::frame('document.jsonld', 'frame.jsonld');
$flattened = JsonLD::flatten('document.jsonld');
$quads = JsonLD::toRdf('document.jsonld');

// Output the expanded document (pretty print)
print JsonLD::toString($expanded, true);

// Serialize the quads as N-Quads
$nquads = new NQuads();
$serialized = $nquads->serialize($quads);
print $serialized;

// And parse them again to a JSON-LD document
$quads = $nquads->parse($serialized);
$document = JsonLD::fromRdf($quads);

print JsonLD::toString($document, true);

// Node-centric API
$doc = JsonLD::getDocument('document.jsonld');

// get the default graph
$graph = $doc->getGraph();

// get all nodes in the graph
$nodes = $graph->getNodes();

// retrieve a node by ID
$node = $graph->getNode('http://example.com/node1');

// get a property
$node->getProperty('http://example.com/vocab/name');

// add a new blank node to the graph
$newNode = $graph->createNode();

// link the new blank node to the existing node
$node->addPropertyValue('http://example.com/vocab/link', $newNode);

// even reverse properties are supported; this returns $newNode
$node->getReverseProperty('http://example.com/vocab/link');

// serialize the graph and convert it to a string
$serialized = JsonLD::toString($graph->toJsonLd());

Commercial Support

Commercial support is available on request.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].