jsonutil

package
v0.0.0-...-1a99902 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeWithNumber

func DecodeWithNumber(r io.Reader, value interface{}) error

DecodeWithNumber decodes input data using json.Decoder, ensuring numbers are preserved via json.Number data type. It errors out on invalid json or any excess input.

func StructFields

func StructFields(s interface{}, exceptions ...string) []string

StructFields takes a pointer to a struct and a list of exceptions, and returns a list of the fields in the struct that are JSON-tagged and whose tag is not in the list of exceptions. The struct can be nil.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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