|
16 | 16 |
|
17 | 17 | - Primitives, arrays, maps, structs, time.Time and interface{}. |
18 | 18 | - Appengine \*datastore.Key and datastore.Cursor. |
19 | | -- [CustomEncoder](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#example-CustomEncoder)/CustomDecoder |
20 | | - interfaces for custom encoding. |
| 19 | +- [CustomEncoder]/[CustomDecoder] interfaces for custom encoding. |
21 | 20 | - [Extensions](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#example-RegisterExt) to encode |
22 | 21 | type information. |
23 | 22 | - Renaming fields via `msgpack:"my_field_name"` and alias via `msgpack:"alias:another_name"`. |
24 | 23 | - Omitting individual empty fields via `msgpack:",omitempty"` tag or all |
25 | | - [empty fields in a struct](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#example-Marshal--OmitEmpty). |
26 | | -- [Map keys sorting](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#Encoder.SortMapKeys). |
| 24 | + [empty fields in a struct](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#example-Marshal-OmitEmpty). |
| 25 | +- [Map keys sorting](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#Encoder.SetSortMapKeys). |
27 | 26 | - Encoding/decoding all |
28 | | - [structs as arrays](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#Encoder.UseArrayForStructs) |
| 27 | + [structs as arrays](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#Encoder.UseArrayEncodedStructs) |
29 | 28 | or |
30 | | - [individual structs](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#example-Marshal--AsArray). |
31 | | -- [Encoder.UseJSONTag](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#Encoder.UseJSONTag) with |
32 | | - [Decoder.UseJSONTag](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#Decoder.UseJSONTag) can |
33 | | - turn msgpack into drop-in replacement for JSON. |
| 29 | + [individual structs](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#example-Marshal-AsArray). |
| 30 | +- [Encoder.SetCustomStructTag] with [Decoder.SetCustomStructTag] can turn msgpack into drop-in |
| 31 | + replacement for any tag. |
34 | 32 | - Simple but very fast and efficient |
35 | | - [queries](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#example-Decoder-Query). |
| 33 | + [queries](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#example-Decoder.Query). |
| 34 | + |
| 35 | +[customencoder]: https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#CustomEncoder |
| 36 | +[customdecoder]: https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#CustomDecoder |
| 37 | +[encoder.setcustomstructtag]: |
| 38 | + https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#Encoder.SetCustomStructTag |
| 39 | +[decoder.setcustomstructtag]: |
| 40 | + https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#Decoder.SetCustomStructTag |
36 | 41 |
|
37 | 42 | ## Installation |
38 | 43 |
|
|
0 commit comments