jsontest

package
v28.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatJson

func FormatJson(a []byte) ([]byte, error)

Takes json []byte input, unmarshals and then marshals, in order to get a canonical representation of json (i.e. formatted with objects ordered). Ugly and perhaps inefficient, but effective! :p

func JsonEqual

func JsonEqual(a []byte, b []byte) (bool, []byte, []byte, error)

Checks whether two json []byte are equivalent (equal) by formatting/ordering both of them consistently, and then comparing if formatted versions are identical. Returns true/false together with formatted json, and any error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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