json

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: UPL-1.0 Imports: 10 Imported by: 0

Documentation

Overview

Package json handles ad-hoc JSON processing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJSONDataFromBuffer

func GetJSONDataFromBuffer(log *zap.SugaredLogger, buffer []byte) (jsonData interface{}, err error)

GetJSONDataFromBuffer Gets JsonData from a buffer. This is useful for when we extract a Json value out of something else. For example if there is Json data in an otherwise unstructured log message that we are looking at. Helm version is also an example where there is mixed text and Json, etc...

func GetJSONDataFromFile

func GetJSONDataFromFile(log *zap.SugaredLogger, path string) (jsonData interface{}, err error)

GetJSONDataFromFile will open the specified JSON file, unmarshal it into a interface{}

func GetJSONValue

func GetJSONValue(log *zap.SugaredLogger, jsonData interface{}, jsonPath string) (jsonValue interface{}, err error)

GetJSONValue gets a JSON value

Types

This section is empty.

Jump to

Keyboard shortcuts

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