MCPcopy Index your code
hub / github.com/dearcode/candy / encodeJSON

Function encodeJSON

client/util.go:47–53  ·  view source on GitHub ↗
(data interface{})

Source from the content-addressed store, hash-verified

45}
46
47func encodeJSON(data interface{}) ([]byte, error) {
48 body, err := json.Marshal(data)
49 if err != nil {
50 return nil, err
51 }
52 return body, nil
53}
54
55// DecodeUserInfo 把json数据解析成UserInfo
56func DecodeUserInfo(data []byte) (*UserInfo, error) {

Callers 5

GetUserInfoByNameMethod · 0.85
GetUserInfoByIDMethod · 0.85
LoadFriendListMethod · 0.85
FindUserMethod · 0.85
LoadGroupListMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected