Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualJSON ¶
EqualJSON compares 2 JSON strings and compares them for semantic equality. That is, they are both parsed to interface{} and tested for equality using reflect.DeepEqual. An error is returned if either a or b is invalid JSON.
func StrictParseJSON ¶
StrictParseJSON attempts to parse rawJSON into v. If any fields of the rawJSON are not present in v, it returns an error. If any of the fields not tagged omitempty are not present in the rawJSON, it returns an error. Fields marked omitempty are considered optional, but must not be present when empty in the source JSON. StrictParseJSON is case sensitive for field names, so you will need to use json field tags if rawJSON does not use UpperCaseCamel casing. Error messages are not very granular, "empty or missing fields" with a dump of the input JSON and a dump a zeroed v with required fields shown.
Types ¶
This section is empty.