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.
- Host: GitHub
- URL: https://github.com/danubetech/cborld-java
- Owner: danubetech
- License: apache-2.0
- Created: 2021-04-16T17:26:13.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-21T18:52:50.000Z (11 months ago)
- Last Synced: 2025-03-21T19:45:18.582Z (11 months ago)
- Topics: shared-libraries
- Language: Java
- Homepage:
- Size: 99.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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