jsonstruct

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: BSD-3-Clause, GPL-2.0-or-later Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ParseTag = parseTag

Functions

func ClearCache

func ClearCache()

Types

type StructField

type StructField struct {
	Name      string
	Path      []int
	Tagged    bool
	OmitEmpty bool
	Quote     bool
}

type StructIndex

type StructIndex struct {
	ByPos  []StructField
	ByName map[string]int
}

A StructIndex is used by Decoder.Decode() and Encoder.Encode() when decoding-to or encoding-from a struct.

func IndexStruct

func IndexStruct(typ reflect.Type) StructIndex

IndexStruct takes a struct Type, and indexes its fields for use by Decoder.Decode() and Encoder.Encode(). indexStruct caches its results.

Jump to

Keyboard shortcuts

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