-
Notifications
You must be signed in to change notification settings - Fork 8
/
doc.go
48 lines (48 loc) · 1.79 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Package gson provide a toolkit for JSON representation, collation
// and transformation.
//
// Package provides APIs to convert data representation from one format
// to another. Supported formats are:
// * JSON
// * Golang value
// * CBOR - Concise Binary Object Representation
// * Binary-collation
//
// CBOR:
//
// Concise Binary Object Representation, CBOR, is based on RFC-7049
// specification to encode golang data into machine friendly format.
// Following golang native types are supported:
// * nil, true, false.
// * native integer types, and its alias, of all width.
// * float32, float64.
// * slice of bytes.
// * native string.
// * slice of interface - []interface{}.
// * map of string to interface{} - map[string]interface{}.
//
// Types from golang's standard library and custom types provided
// by this package that can be encoded using CBOR:
// * CborTagBytes: a cbor encoded []bytes treated as value.
// * CborUndefined: encode a data-item as undefined.
// * CborIndefinite: encode bytes, string, array and map of unspecified length.
// * CborBreakStop: to encode end of CborIndefinite length item.
// * CborTagEpoch: in seconds since epoch.
// * CborTagEpochMicro: in micro-seconds epoch.
// * CborTagFraction: m*(10**e)
// * CborTagFloat: m*(2**e)
// * CborTagPrefix: to self identify a binary blog as CBOR.
//
// Package also provides an implementation for encoding JSON to CBOR
// and vice-versa:
// * Number can be encoded as integer or float.
// * Arrays and maps are encoded using indefinite encoding.
// * Byte-string encoding is not used.
//
// Json-Pointer:
//
// Package also provides a RFC-6901 (JSON-pointers) implementation.
//
// NOTE: Buffer supplied to APIs NewJson(), NewCbor(), NewCollate()
// should atleast be 128 bytes in size.
package gson