Skip to content

ajanikow-buf/ubjson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published