Go package for working with Universal Binary JSON - http://ubjson.org/
Go
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
testdata
.gitignore
.travis.yml
Gopkg.lock
Gopkg.toml
LICENSE
README.md
bench_test.go
decode.go
decode_go18.go
decode_go19.go
decode_test.go
encode.go
encode_test.go
errors.go
example_nameless_test.go
example_pair_test.go
example_tag_test.go
example_test.go
example_value_test.go
fields.go
fuzz.go
marker.go
reader.go
ubjson.go
ubjson_test.go
writer.go

README.md

UBJSON GoDoc Build Status Go Report Card

A Go package implementing encoding and decoding of Universal Binary JSON (spec 12).

Features

  • Type specific methods for built-in types.

  • Automatic encoding via reflection for most types.

  • Custom encoding via Value interface.

  • Streaming support via Encoder/Decoder.

  • Support for optimized format.

  • Block format.

Usage

b, _ := ubjson.MarshalBlock(8)
// [U][8]

b, _ = ubjson.MarshalBlock("hello")
// [S][U][5][hello]

var v interface{}
...
b, _ = ubjson.Marshal(v)
// ...

See the GoDoc for more information and examples.