Professional Documents
Culture Documents
CBOR
CBOR
CBOR
Jackson (Java) data format module that supports reading and writing
CBOR (“Concise Binary Object Representation”) encoded data. Module
extends standard Jackson streaming API (JsonFactory, JsonParser,
JsonGenerator), and as such works seamlessly with all the higher level
data abstractions (data binding, tree model, and pluggable extensions).
1 CBORFactory f = new CBORFactory();
2 ObjectMapper mapper = new ObjectMapper(f);
3 // and then read/write data as usual
4 SomeType value = ...;
5 byte[] cborData = mapper.writeValueAsBytes(value);
6 SomeType otherValue = mapper.readValue(cborData, SomeType.class);