Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CoerceInterfaceMapToStringMap ¶
func CoerceInterfaceMapToStringMap(in interface{}) (interface{}, error)
CoerceInterfaceMapToStringMap converts map[interface{}]interface{} (interface maps) to map[string]interface{} (string maps) and []interface{} with interface maps to string maps. Relevant when serializing between CBOR and JSON.
It also handles the CBOR 'bignum' type as documented here: https://tools.ietf.org/html/rfc7049#section-2.4.2
func ParseDietCBOR ¶
ParseDietCBOR attempts to coerce the input byte array into valid CBOR and then coerces it into a JSON object. Assumes the input is "diet" CBOR which is like CBOR, except: 1. It is guaranteed to always be a map 2. It may or may not include the opening and closing markers "{}"
func ParseStandardCBOR ¶
ParseStandardCBOR parses CBOR in "standards compliant" mode. Literal values are passed through "as-is". The input is not assumed to be a map. Empty inputs will return nil.
Types ¶
This section is empty.