An implementation of the CBOR-LD 1.0 in Java.
- Semantic compression / decompression
- Configurable API
- Custom document dictionaries and builders
- Verifiable Credential Barcodes
LD-CLI is a command line utility for Ubuntu, Mac and Windows.
// create an encoder builder initialized with default values
var encoder = CborLd.createEncoder()
// use bundled static contexts (true by default)
.useBundledContexts(true)
// loader (optional)
.loader(...)
// custom terms dictionary (optional)
.dictionary(customDictionary)
// create a new encoder instance
.build();
// create barcodes encoder builder
var encoder = CborLd.createEncoder(BarcodesConfig.INSTANCE)
// ... customize
.build()
// encode a document
byte[] encoded = encoder.encode(document);
// create a decoder builder initialized with default values
var decoder = CborLd.createDecoder()
// use bundled static contexts (true by default)
.useBundledContexts(true)
// loader (optional)
.loader(...)
// add custom terms dictionary (optional)
.dictionary(customDictionary);
// create a new decoder instance
.build();
// create barcodes decoder builder
var decoder = CborLd.createDecoder(BarcodesConfig.INSTANCE)
// ... customize
.build()
// decode
document = decoder.decode(encoded);
// Iridium < v0.2.0
CborLd.create[Encoder|Decoder](V05Config.INSTANCE)
// ... customize
.build();
// Iridium < v0.2.0, @digitalbazaar/cborld compatibility
CborLd.create[Encoder|Decoder](V05Config.INSTANCE)
.compactArrays(false)
// ... customize
.build();
Java 17+
<dependency>
<groupId>com.apicatalog</groupId>
<artifactId>iridium-cbor-ld</artifactId>
<version>0.3.0</version>
</dependency>
Iridium CBOR-LD for Android is distributed under a commercial license. Contact
Add JSON-P provider, if it is not on the classpath already.
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<version>2.0.1</version>
</dependency>
All PR's welcome!
Fork and clone the project repository.
> cd iridium-cbor-ld
> mvn clean package
- CBOR-LD 1.0
- Concise Binary Object Representation (CBOR)
- Hello CBOR-LD Presentation
- cbor.io
- JavaScript CBOR-LD Processor
- CBOR Playground
Commercial support is available at filip26@gmail.com