Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

UBJSON for Java

Maven Central

Build Status

Universal Binary JSON is a binary JSON specification designed for ultimate read performance; bringing simplicity, size and performance all together into a single specification that is 100% compatible with JSON.

Write a UBValue to a stream:

UBObject obj = UBValueFactory.createObject();
obj.put("hello", UBValueFactory.createString("world"));
obj.put("array", UBValueFactory.createArray(new int[] {1,2,3}));

ByteArrayOutputStream out = new ByteArrayOutputStream();
UBWriter writer = new UBWriter(out);
writer.write(value);
writer.close();

Read from stream:


UBReader reader = new UBReader(in);

UBValue value = reader.read();
assert(value.isObject());
UBObject obj = value.asObject();
String value = obj.get("hello").asString();

reader.close();

About

A UBJSON lib for Java

Resources

License

Packages

No packages published
You can’t perform that action at this time.