jsonutil

package
Version: v0.0.0-...-c7fba9c Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 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.

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL