json_comparator

package
v0.0.0-...-dc806d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const CONFIG_DEFAULT = 0
View Source
const CONFIG_SLICE_COMPAR_FULL = 1
View Source
const ERROR_INTERNAL = 12
View Source
const ERROR_JSON_MARSHAL = 4
View Source
const ERROR_JSON_UNMARSHAL = 3
View Source
const ERROR_MAP_KEYS_MISMATCH = 7
View Source
const ERROR_MAP_TYPE = 6
View Source
const ERROR_REFERENCE_OBJECT = 10
View Source
const ERROR_SLICE_COMPAR_FULL_FAIL = 11
View Source
const ERROR_TYPE_CONVERTION = 8
View Source
const ERROR_TYPE_MISMATCH = 5
View Source
const ERROR_TYPE_UNSUPPORTED = 9
View Source
const MSG_DIFFERENT = "Objects are different."
View Source
const MSG_EQUAL = "Objects are equal."
View Source
const MSG_ERROR_INTERNAL = "INTERNAL_ERROR"
View Source
const MSG_SIMILAR = "Objects have similar Structure, " +
	"but the Values are different."
View Source
const MSG_UNKNOWN = "JSON Object has an unknown Field ('null'), " +
	"and can not be compared. However, no Errors have been found."
View Source
const RESULT_EQUAL = 0
View Source
const RESULT_SIMILAR = 1
View Source
const RESULT_UNKNOWN = 2

Variables

This section is empty.

Functions

func CompareBool

func CompareBool(
	iA interface{},
	iB interface{},
	verbose bool) (int, error)

Compares Boolean Variables.

func CompareBytesWithObject

func CompareBytesWithObject(
	src []byte,
	dst interface{},
	config Config,
	verbose bool) (int, error)

Compares JSON Bytes with Destination Object.

func CompareComplex128

func CompareComplex128(
	iA interface{},
	iB interface{},
	verbose bool) (int, error)

Compares Complex128 Variables.

func CompareComplex64

func CompareComplex64(
	iA interface{},
	iB interface{},
	verbose bool) (int, error)

Compares Complex64 Variables.

func CompareFloat32

func CompareFloat32(
	iA interface{},
	iB interface{},
	verbose bool) (int, error)

Compares Float32 Variables.

func CompareFloat64

func CompareFloat64(
	iA interface{},
	iB interface{},
	verbose bool) (int, error)

Compares Float64 Variables.

func CompareInt

func CompareInt(
	iA interface{},
	iB interface{},
	verbose bool) (int, error)

Compares 'int' Variables.

func CompareInt16

func CompareInt16(
	iA interface{},
	iB interface{},
	verbose bool) (int, error)

Compares 'int16' Variables.

func CompareInt32

func CompareInt32(
	iA interface{},
	iB interface{},
	verbose bool) (int, error)

Compares 'int32' Variables.

func CompareInt64

func CompareInt64(
	iA interface{},
	iB interface{},
	verbose bool) (int, error)

Compares 'int64' Variables.

func CompareInt8

func CompareInt8(
	iA interface{},
	iB interface{},
	verbose bool) (int, error)

Compares 'int8' Variables.

func CompareInterfaces

func CompareInterfaces(
	iA interface{},
	iB interface{},
	config Config,
	verbose bool) (int, error)

Compares Interfaces.

func CompareMaps

func CompareMaps(
	iA interface{},
	iB interface{},
	config Config,
	verbose bool) (int, error)

Compares Maps.

func CompareSlices

func CompareSlices(
	iA interface{},
	iB interface{},
	config Config,
	verbose bool) (int, error)

Compares Slices.

func CompareStrings

func CompareStrings(
	iA interface{},
	iB interface{},
	verbose bool) (int, error)

Compares Strings.

func CompareUint

func CompareUint(
	iA interface{},
	iB interface{},
	verbose bool) (int, error)

Compares 'uint' Variables.

func CompareUint16

func CompareUint16(
	iA interface{},
	iB interface{},
	verbose bool) (int, error)

Compares 'uint16' Variables.

func CompareUint32

func CompareUint32(
	iA interface{},
	iB interface{},
	verbose bool) (int, error)

Compares 'uint32' Variables.

func CompareUint64

func CompareUint64(
	iA interface{},
	iB interface{},
	verbose bool) (int, error)

Compares 'uint64' Variables.

func CompareUint8

func CompareUint8(
	iA interface{},
	iB interface{},
	verbose bool) (int, error)

Compares 'uint8' Variables.

func GetMapKeyNames

func GetMapKeyNames(obj interface{}, verbose bool) ([]string, error)

Returns the sorted List of Map's Keys.

func MapKeysAreEqual

func MapKeysAreEqual(a, b []string, verbose bool) bool

Compares Two String Slices (Map's String Keys).

func PrintResult

func PrintResult(result int, err error)

Outputs Result in a Human-readable Way.

Types

type Config

type Config uint8

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL