DecodeFriendList 把json数据解析成FriendList
(data []byte)
| 72 | |
| 73 | // DecodeFriendList 把json数据解析成FriendList |
| 74 | func DecodeFriendList(data []byte) (*FriendList, error) { |
| 75 | friendList := &FriendList{} |
| 76 | if err := json.Unmarshal(data, &friendList); err != nil { |
| 77 | return nil, fmt.Errorf("Decode FriendList error:%v", err.Error()) |
| 78 | } |
| 79 | return friendList, nil |
| 80 | } |
| 81 | |
| 82 | // DecodeGroupList 把json数据解析成GroupList |
| 83 | func DecodeGroupList(data []byte) (*GroupList, error) { |