Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 {
jsoni.DummyExtension
}
func (*BinaryAsStringExtension) CreateDecoder ¶
func (extension *BinaryAsStringExtension) CreateDecoder(typ reflect2.Type) jsoni.ValDecoder
func (*BinaryAsStringExtension) CreateEncoder ¶
func (extension *BinaryAsStringExtension) CreateEncoder(typ reflect2.Type) jsoni.ValEncoder
type NamingStrategyExtension ¶
type NamingStrategyExtension struct { jsoni.DummyExtension Translate func(string) string }
func (*NamingStrategyExtension) UpdateStructDescriptor ¶
func (e *NamingStrategyExtension) UpdateStructDescriptor(sd *jsoni.StructDescriptor)
Click to show internal directories.
Click to hide internal directories.