UnmarshalJSON Reverse process of Marshal.
(b []byte)
| 449 | |
| 450 | // UnmarshalJSON Reverse process of Marshal. |
| 451 | func (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 | } |