extra

package
v0.0.0-...-8744d7c Latest Latest
Warning

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

Go to latest
Published: May 26, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LowerCaseWithUnderscores

func LowerCaseWithUnderscores(name string) string

LowerCaseWithUnderscores one strategy to SetNamingStrategy for. It will change HelloWorld to hello_world.

func RegisterFuzzyDecoders

func RegisterFuzzyDecoders()

RegisterFuzzyDecoders decode input from PHP with tolerance. It will handle string/number auto conversation, and treat empty [] as empty struct.

func RegisterTimeAsInt64Codec

func RegisterTimeAsInt64Codec(precision time.Duration)

RegisterTimeAsInt64Codec encode/decode time since number of unit since epoch. the precision is the unit.

func SetNamingStrategy

func SetNamingStrategy(translate func(string) string)

SetNamingStrategy rename struct fields uniformly

func SupportPrivateFields

func SupportPrivateFields()

SupportPrivateFields include private fields when encoding/decoding

Types

type BinaryAsStringExtension

type BinaryAsStringExtension struct {
	jsoniter.DummyExtension
}

func (*BinaryAsStringExtension) CreateDecoder

func (extension *BinaryAsStringExtension) CreateDecoder(typ reflect2.Type) jsoniter.ValDecoder

func (*BinaryAsStringExtension) CreateEncoder

func (extension *BinaryAsStringExtension) CreateEncoder(typ reflect2.Type) jsoniter.ValEncoder

Jump to

Keyboard shortcuts

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