Giter VIP home page Giter VIP logo

titanium-json-ld's Introduction

Titanium JSON-LD 1.1 Processor & API

An implementation of the JSON-LD 1.1 (JSON-based Serialization for Linked Data) specification in Java utilizing Jakarta JSON Processing.

The goals of Titanium are:

  • conformance to the specification
  • secure, stable, fast, A+ code
  • minimal external dependencies
    • only jakarta.json-api is required
  • simple to use

Build Language grade: Java Maintainability Rating Codacy Badge Maven Central License

Table of Contents

Conformance

The goal is to pass the official test suite and conform to the JSON-LD 1.1 specification.

Status

Feature Tests Pass Status Notes
Expansion 371 371 100%
Compaction 239 239 100%
Flattening 55 55 100%
JSON-LD to RDF 451 449 99.5%
RDF to JSON-LD 51 51 100%
Framing 89 88 98.8%
Remote Document and Context Retrieval 18 17 94.4%

See EARL results from the JSON-LD 1.1 Test Suite for more details.

Extensions

Usage

Installation

Titanium

Maven

<dependency>
    <groupId>com.apicatalog</groupId>
    <artifactId>titanium-json-ld</artifactId>
    <version>1.0.0</version>
</dependency>

Gradle

compile group: 'com.apicatalog', name: 'titanium-json-ld', version: '1.0.0'

JSON-P Provider

Add JSON-P provider, if it is not on the classpath already.

Maven

    <dependency>
        <groupId>org.glassfish</groupId>
        <artifactId>jakarta.json</artifactId>
        <version>2.0.0</version>
    </dependency>

Gradle

compile group: 'org.glassfish', name: 'jakarta.json', version: '2.0.0'

Documentation

javadoc

Examples

Titanium provides high-level JsonLd API to interact with the processor.

// Expansion
JsonLd.expand("https://w3c.github.io/json-ld-api/tests/expand/0001-in.jsonld")
      .ordered()
      .get();

JsonLd.expand("file:/home/filip/document.json")    // HTTP(S) and File schemes supported
      .context("file:/home/filip/context.jsonld")  // external context
      .get();

// Compaction
JsonLd.compact("https://example/expanded.jsonld", "https://example/context.jsonld")
      .compactToRelative(false)
      .get();

// Flattening
JsonLd.flatten("https://example/document.jsonld").get();

// JSON-LD to RDF
JsonLd.toRdf("https://example/document.jsonld").get();

// RDF to JSON-LD
JsonLd.fromRdf("https://example/document.nq").options(options).get();

// Framing
JsonLd.frame("https://example/document.jsonld", "https://example/frame.jsonld").get();
// Local document
Document document = JsonDocument.of(InputStream) or JsonDocument.of(Reader) ...

JsonLd.expand(document).get();

JsonLd.compact(document, contextDocument).get();
...

Contributing

Your contribution is welcome! There are many ways to motivate developers or speed up development:

  • develop
    • implement a new feature
    • fix an existing issue
    • improve an existing implementation
  • test
    • report a bug
    • implement a test case
  • document
    • write javadoc
    • write a tutorial
    • proofread an existing documentation
  • promote
    • star, share, the project
    • write an article
  • sponsor
    • your requests get top priority
    • you will get a badge

Building

Fork and clone the project repository.

> cd titanium-json-ld
> ./mvnw clean package

Commercial Support

Commercial support is available at [email protected]

titanium-json-ld's People

Contributors

codacy-badger avatar dependabot[bot] avatar ebremer avatar filip26 avatar jmvanel avatar kevinpeterson avatar magemasher avatar simon-greatrix avatar umbreak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.