MCPcopy Create free account
hub / github.com/DoNewsCode/core / Unmarshal

Method Unmarshal

config/codec_parser.go:14–20  ·  view source on GitHub ↗

Unmarshal converts the bytes to map

(bytes []byte)

Source from the content-addressed store, hash-verified

12
13// Unmarshal converts the bytes to map
14func (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.
23func (c CodecParser) Marshal(m map[string]interface{}) ([]byte, error) {

Callers 1

Calls 1

UnmarshalMethod · 0.65

Tested by 1