import "github.com/hashicorp/vault/sdk/helper/jsonutil"
DecodeJSON tries to decompress the given data. The call to decompress, fails if the content was not compressed in the first place, which is identified by a canary byte before the compressed data. If the data is not compressed, it is JSON decoded directly. Otherwise the decompressed data will be JSON decoded.
Decodes/Unmarshals the given io.Reader pointing to a JSON, into a desired object
Encodes/Marshals the given object into JSON
func EncodeJSONAndCompress(in interface{}, config *compressutil.CompressionConfig) ([]byte, error)
EncodeJSONAndCompress encodes the given input into JSON and compresses the encoded value (using Gzip format BestCompression level, by default). A canary byte is placed at the beginning of the returned bytes for the logic in decompression method to identify compressed input.
Package jsonutil imports 7 packages (graph) and is imported by 49 packages. Updated 2019-04-12. Refresh now. Tools for package owners.