Skip to content

filip26/iridium-cbor-ld

Repository files navigation

Iridium CBOR-LD

An implementation of the CBOR-LD 1.0 in Java.

Java 17 CI Java 8 CI Maven Central License

CLI

LD-CLI ia a command line utility for Ubuntu, Mac and Windows.

Installation

Maven

Java 17+

<dependency>
    <groupId>com.apicatalog</groupId>
    <artifactId>iridium-cbor-ld</artifactId>
    <version>0.1.3</version>
</dependency>

Gradle

Java 8+, Android API Level >=31

implementation("com.apicatalog:iridium-cbor-ld-jre8:0.1.3")

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.1</version>
</dependency>
Gradle
implementation("org.glassfish:jakarta.json:2.0.1")

Usage

Encoding

  byte[] encoded = CborLd.encoder(document).encode();

Decoding

  document = CborLd.decoder(encoded).decode();

@digitalbazaar/cborld compatibility

Set DbConfig as a configuration option to an encoder or decoder API.

e.g.

  CborLd.encoder(document)
        .config(DbConfig.INSTANCE)
        .encode();
        
  CborLd.decoder(document)
        .config(DbConfig.INSTANCE)
        .decode();
        

Documentation

javadoc

Contributing

All PR's welcome!

Building

Fork and clone the project repository.

Java 17

> cd iridium-cbor-ld
> mvn clean package

Java 8

> cd iridium-cbor-ld
> mvn -f pom_jre8.xml clean package

Resources

Sponsors

Commercial Support

Commercial support is available at filip26@gmail.com