An open API service indexing awesome lists of open source software.

https://github.com/danubetech/cborld-java

Java implementation of CBOR-LD.
https://github.com/danubetech/cborld-java

shared-libraries

Last synced: 27 days ago
JSON representation

Java implementation of CBOR-LD.

Awesome Lists containing this project

README

          

# cborld-java

## Information

This is a work-in-progress implementation of CBOR-LD.

Not ready for production use! Use at your own risk! Pull requests welcome.

## Maven

Build:

mvn clean install

Dependency:



danubetech-maven-public
https://repo.danubetech.com/repository/maven-public/


com.danubetech
cborld-java
1.1.0

## Example

Example code:

// encode to CBOR-LD

byte[] bytes = CborLdEncode.encode(jsonLdDocument, DOCUMENT_LOADER);
System.out.println(Hex.encodeHex(bytes));

// generate QR code

byte[] qrCode = CborLdQrCode.toQrCode(bytes);
File outputfile = new File("example-qrcode.png");
OutputStream out = new FileOutputStream(outputfile);
out.write(qrCode);
out.close();

// decode from CBOR-LD

Map decoded = (Map) CborLdDecode.decode(bytes, DOCUMENT_LOADER);

Example QR code:

https://github.com/danubetech/cborld-java/blob/main/docs/example-qrcode.png

## About

Danube Tech - https://danubetech.com/


This software library is part of a project that has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No 871932