Documentation ¶
Index ¶
- func MarshalJSON(anyObject interface{}) string
- func MarshalPrettyJSON(anyObject interface{}) string
- func UnmarshalToJson(v interface{}) *sjson.Json
- type IP
- type JsonExt
- func (j *JsonExt) CheckGetExt(key string) (*JsonExt, bool)
- func (j *JsonExt) GetExt(key string) *JsonExt
- func (j *JsonExt) GetIndexExt(index int) *JsonExt
- func (j *JsonExt) GetPathExt(branch ...string) *JsonExt
- func (j *JsonExt) IsNil() bool
- func (j *JsonExt) MustInt16() int16
- func (j *JsonExt) MustInt32() int32
- func (j *JsonExt) MustInt8() int8
- func (j *JsonExt) MustStringPtr() *string
- func (j *JsonExt) MustUint16() uint16
- func (j *JsonExt) MustUint32() uint32
- func (j *JsonExt) MustUint8() uint8
- type JsonString
- type JsonTime
- type RawJsonForm
- type SimpleJsonMarshaler
- type SimpleJsonUnmarshaler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalJSON ¶
func MarshalJSON(anyObject interface{}) string
Gets the JSON
This method would panic if the JSON cannot be marshalled
func MarshalPrettyJSON ¶
func MarshalPrettyJSON(anyObject interface{}) string
Gets the JSON(pretty)
This method would panic if the JSON cannot be marshalled
func UnmarshalToJson ¶
Types ¶
type IP ¶
This type of time would be serialized to UNIX time for MarshalJSON()
func (IP) MarshalJSON ¶
func (*IP) UnmarshalJSON ¶
UnmarshalJSON parses the JSON-encoded IP string
type JsonExt ¶
func UnmarshalToJsonExt ¶
func UnmarshalToJsonExt(v interface{}) *JsonExt
func (*JsonExt) GetIndexExt ¶
func (*JsonExt) GetPathExt ¶
func (*JsonExt) MustStringPtr ¶
func (*JsonExt) MustUint16 ¶
func (*JsonExt) MustUint32 ¶
type JsonString ¶
type JsonString string
When marshalling, the empty string would be "null" in JSON format
func (JsonString) MarshalJSON ¶
func (s JsonString) MarshalJSON() ([]byte, error)
type JsonTime ¶
This type of time would be serialized to UNIX time for MarshalJSON()
func (JsonTime) MarshalJSON ¶
MarshalJSON does the serialization of UNIX timestamp
func (*JsonTime) UnmarshalJSON ¶
UnmarshalJSON does the deserialization of UNIX timestamp
type RawJsonForm ¶
type RawJsonForm string
When marshalling, the string would be the raw form of JSON format
func (RawJsonForm) MarshalJSON ¶
func (s RawJsonForm) MarshalJSON() ([]byte, error)
type SimpleJsonMarshaler ¶
type SimpleJsonUnmarshaler ¶
Click to show internal directories.
Click to hide internal directories.