Documentation ¶
Index ¶
- Constants
- Variables
- func ParseInt(v interface{}) (int64, bool)
- func ParseNumber(v interface{}) (float64, bool)
- func ParseString(v interface{}) (string, bool)
- func ToString(s string) fmt.Stringer
- type CDATA
- type JSONer
- type Map
- func (m Map) Append(p Map) Map
- func (m Map) AppendArray(key string, v ...interface{}) Map
- func (m Map) Check(s ...string) int
- func (m Map) Clone() Map
- func (m Map) Delete(key string) bool
- func (m Map) DeletePath(keys []string) bool
- func (m Map) Expect(keys []string) Map
- func (m Map) Get(s string) interface{}
- func (m Map) GetArray(s string) []interface{}
- func (m Map) GetArrayD(s string, d []interface{}) []interface{}
- func (m Map) GetBool(s string) bool
- func (m Map) GetBoolD(s string, b bool) bool
- func (m Map) GetBytes(s string) []byte
- func (m Map) GetBytesD(s string, d []byte) []byte
- func (m Map) GetD(s string, d interface{}) interface{}
- func (m Map) GetInt64(s string) (int64, bool)
- func (m Map) GetInt64D(s string, d int64) int64
- func (m Map) GetMap(s string) Map
- func (m Map) GetMapArray(s string) []Map
- func (m Map) GetMapArrayD(s string, d []Map) []Map
- func (m Map) GetMapD(s string, d Map) Map
- func (m Map) GetNumber(s string) (float64, bool)
- func (m Map) GetNumberD(s string, d float64) float64
- func (m Map) GetPath(keys []string) interface{}
- func (m Map) GetString(s string) string
- func (m Map) GetStringArray(s string) []string
- func (m Map) GetStringArrayD(s string, d []string) []string
- func (m Map) GetStringD(s string, d string) string
- func (m Map) Has(key string) bool
- func (m Map) HasPath(keys []string) bool
- func (m Map) Join(s Map) Map
- func (m Map) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (m Map) Only(keys []string) Map
- func (m Map) ParseJSON(b []byte) error
- func (m Map) ParseXML(b []byte) error
- func (m Map) Range(f func(key string, value interface{}) bool)
- func (m Map) Replace(s string, v interface{}) Map
- func (m Map) ReplaceFromMap(s string, v Map) Map
- func (m Map) ReplaceJoin(s Map) Map
- func (m Map) Set(key string, v interface{}) Map
- func (m Map) SetNil(s string, v interface{}) Map
- func (m Map) SetPath(keys []string, v interface{}) Map
- func (m Map) SortKeys() []string
- func (m Map) String() string
- func (m Map) ToEncodeURL() string
- func (m Map) ToGoMap() map[string]interface{}
- func (m Map) ToJSON() (v []byte, err error)
- func (m Map) ToMap() Map
- func (m Map) ToStruct(v interface{}) (e error)
- func (m Map) ToXML() ([]byte, error)
- func (m Map) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- type Mapper
- type String
- type Stringer
- type XMLer
Constants ¶
const CustomHeader = `<?xml version="1.0" encoding="UTF-8" standalone="no"?>`
CustomHeader xml header
Variables ¶
var ErrNilMap = errors.New("nil map")
ErrNilMap ...
Functions ¶
func ParseNumber ¶
ParseNumber parse interface to number
func ParseString ¶
ParseString parse interface to string
Types ¶
type Map ¶
type Map map[string]interface{}
Map ...
func ToMap ¶
func ToMap(p interface{}) Map
ToMap transfer to map[string]interface{} or MapAble to GMap
func (Map) Append ¶
Append append source map to target map; if the key value is exist and it is a []interface value, this will append into it otherwise, it will replace the value
func (Map) AppendArray ¶ added in v0.0.6
AppendArray ... @Description: append array interface to key @receiver Map @param string @param ...interface{} @return Map
func (Map) Delete ¶
Delete ... @Description: delete key value if key is exist @receiver Map @param string @return bool
func (Map) DeletePath ¶
DeletePath delete keys value if keys is exist
func (Map) Get ¶
Get ... @Description: get interface from map without default @receiver Map @param string @return interface{}
func (Map) GetArray ¶
GetArray ... @Description: get []interface value without default @receiver Map @param string @return []interface{}
func (Map) GetArrayD ¶
GetArrayD ... @Description: get []interface value with default @receiver Map @param string @param []interface{} @return []interface{}
func (Map) GetBool ¶
GetBool ... @Description: get bool from map with out default @receiver Map @param string @return bool
func (Map) GetBoolD ¶
GetBoolD ... @Description: get bool from map with default @receiver Map @param string @param bool @return bool
func (Map) GetBytes ¶
GetBytes ... @Description: get bytes from map with default @receiver Map @param string @return []byte
func (Map) GetBytesD ¶
GetBytesD ... @Description: get bytes from map with default @receiver Map @param string @param []byte @return []byte
func (Map) GetD ¶
GetD ... @Description: get interface from map with default @receiver Map @param string @param interface{} @return interface{}
func (Map) GetInt64 ¶
GetInt64 ... @Description: get int64 from map with out default @receiver Map @param string @return int64 @return bool
func (Map) GetInt64D ¶
GetInt64D ... @Description: get int64 from map with default @receiver Map @param string @param int64 @return int64
func (Map) GetMap ¶
GetMap ... @Description: get map from map without default @receiver Map @param string @return Map
func (Map) GetMapArray ¶
GetMapArray get map from map with out default
func (Map) GetMapArrayD ¶
GetMapArrayD ... @Description: get gomap from gomap with default @receiver Map @param string @param []Map @return []Map
func (Map) GetMapD ¶
GetMapD ... @Description: get map from map with default @receiver Map @param string @param Map @return Map
func (Map) GetNumber ¶
GetNumber ... @Description: get float64 from map with out default @receiver Map @param string @return float64 @return bool
func (Map) GetNumberD ¶
GetNumberD ... @Description: get float64 from map with default @receiver Map @param string @param float64 @return float64
func (Map) GetPath ¶
GetPath returns the element in the tree indicated by 'keys'. If keys is of length zero, the current tree is returned.
func (Map) GetString ¶
GetString ... @Description: get string from map with out default @receiver Map @param string @return string
func (Map) GetStringArray ¶
GetStringArray ... @Description: get string from map without default @receiver Map @param string @return []string
func (Map) GetStringArrayD ¶
GetStringArrayD ... @Description: get string from map with default @receiver Map @param string @param []string @return []string
func (Map) GetStringD ¶
GetStringD ... @Description: get string from map with default @receiver Map @param string @param string @return string
func (Map) MarshalXML ¶
MarshalXML ...
func (Map) ReplaceFromMap ¶
ReplaceFromMap replace will set value from other map, if the key is exist from the both map
func (Map) ReplaceJoin ¶
ReplaceJoin insert map s to m with replace
func (Map) Set ¶
Set ... @Description: set interface @receiver Map @param string @param interface{} @return Map
func (Map) SetPath ¶
SetPath is the same as SetPath, but allows you to provide comment information to the key, that will be reused by Marshal().
func (Map) UnmarshalXML ¶
UnmarshalXML ...