json

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckNilField

func CheckNilField(object interface{}, allowNoPointerField bool) error

CheckNilField check if a struct has a nil field if allowNoPointerField is false, it also check if fields are all pointers if param object is not a struct , return nil

func DumpJson

func DumpJson(jsonObject interface{}, filePath string, perm os.FileMode) error

DumpJson dumps json file.

func LoadJsonFile

func LoadJsonFile(path string, jsonObject interface{}) error

LoadJsonFile loads json content from file, unmarshal to jsonObject. check if all field is set if checkNilPointer is true check if any field is not pointer type if allowNoPointerField is false

Types

This section is empty.

Jump to

Keyboard shortcuts

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