Unmarshal converts the bytes to map
(bytes []byte)
| 12 | |
| 13 | // Unmarshal converts the bytes to map |
| 14 | func (c CodecParser) Unmarshal(bytes []byte) (map[string]interface{}, error) { |
| 15 | m := make(map[string]interface{}) |
| 16 | if err := c.Codec.Unmarshal(bytes, &m); err != nil { |
| 17 | return m, err |
| 18 | } |
| 19 | return m, nil |
| 20 | } |
| 21 | |
| 22 | // Marshal converts the map to bytes. |
| 23 | func (c CodecParser) Marshal(m map[string]interface{}) ([]byte, error) { |