MarshalJSON satisfies the json.Marshaler interface.
()
| 32 | |
| 33 | // MarshalJSON satisfies the json.Marshaler interface. |
| 34 | func (m Map) MarshalJSON() ([]byte, error) { |
| 35 | if len(m) == 0 { |
| 36 | return []byte("{}"), nil |
| 37 | } |
| 38 | return m, nil |
| 39 | } |
| 40 | |
| 41 | // UnmarshalJSON satisfies the json.Unmarshaler interface. |
| 42 | func (m *Map) UnmarshalJSON(text []byte) error { |
no outgoing calls