Documentation
¶
Overview ¶
Package jsonequaliser tries to determine if two JSON strings (A and B) are compatible with each other in terms of having the same fields matched to the same types. It tries to reduce false negatives by ignoring extra fields in B and will only require evidence of compatability. For example if A has an array with 3 objects, B just needs one.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExampleIsCompatible ¶
func ExampleIsCompatible()
ExampleIsCompatible shows how the JSON is compatible, even when the data is different. JSONEqualiser just checks the type of the fields
func ExampleIsIncompatible ¶
func ExampleIsIncompatible()
ExampleIsIncompatible shows what happens when there is a problem. When consuming this lib you should check to see if the map is empty.
func IsCompatible ¶
IsCompatible checks that two json strings are structurally the same so that they are compatible. The first string should be your "correct" json, if there are extra fields in B then they will still be seen as compatible
Types ¶
This section is empty.