package extra
import "github.com/json-iterator/go/extra"
Index ¶
- func LowerCaseWithUnderscores(name string) string
- func RegisterFuzzyDecoders()
- func RegisterTimeAsInt64Codec(precision time.Duration)
- func SetNamingStrategy(translate func(string) string)
- func SupportPrivateFields()
- type BinaryAsStringExtension
Functions ¶
func LowerCaseWithUnderscores ¶
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 ¶
RegisterTimeAsInt64Codec encode/decode time since number of unit since epoch. the precision is the unit.
func SetNamingStrategy ¶
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
Source Files ¶
binary_as_string_codec.go fuzzy_decoder.go naming_strategy.go privat_fields.go time_as_int64_codec.go
- Version
- v1.1.12 (latest)
- Published
- Sep 11, 2021
- Platform
- darwin/amd64
- Imports
- 11 packages
- Last checked
- 6 hours ago –
Tools for package owners.