MCPcopy Create free account
hub / github.com/aceld/zinx / UnmarshalJSON

Method UnmarshalJSON

zutils/shard_lock_map.go:451–462  ·  view source on GitHub ↗

UnmarshalJSON Reverse process of Marshal.

(b []byte)

Source from the content-addressed store, hash-verified

449
450// UnmarshalJSON Reverse process of Marshal.
451func (slm ShardLockMaps) UnmarshalJSON(b []byte) (err error) {
452 tmp := make(map[string]interface{})
453
454 if err := json.Unmarshal(b, &tmp); err != nil {
455 return err
456 }
457
458 for key, val := range tmp {
459 slm.Set(key, val)
460 }
461 return nil
462}

Callers 1

TestUnmarshalJSONFunction · 0.95

Calls 1

SetMethod · 0.95

Tested by 1

TestUnmarshalJSONFunction · 0.76