Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 committed Jul 15, 2017
1 parent e0e3222 commit a1a8d58
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,30 @@

A Go package implementing encoding and decoding of [Universal Binary JSON](http://ubjson.org/) (spec 12).

## Usage
## Features

- Type specific methods for built-in types.

- Automatic encoding via reflection for most types.

- Custom encoding via Value interface.

Most types can be automatically encoded through reflection with the Marshal
and Unmarshal functions. Encoders and Decoders additionally provide type
specific methods. Custom encodings can be defined by implementing the Value
interface.
- Streaming support via Encoder/Decoder.

## Usage

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

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

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

See the [GoDoc](https://godoc.org/github.com/jmank88/ubjson) for more information.
See the [GoDoc](https://godoc.org/github.com/jmank88/ubjson) for more
information and [examples](https://godoc.org/github.com/jmank88/ubjson#pkg-examples).

0 comments on commit a1a8d58

Please sign in to comment.