UnmarshalJSON correctly deserializes a NullProjectStatus from JSON.
(b []byte)
| 266 | |
| 267 | // UnmarshalJSON correctly deserializes a NullProjectStatus from JSON. |
| 268 | func (n *NullProjectStatusStr) UnmarshalJSON(b []byte) error { |
| 269 | n.Set = true |
| 270 | var x interface{} |
| 271 | err := json.Unmarshal(b, &x) |
| 272 | if err != nil { |
| 273 | return err |
| 274 | } |
| 275 | err = n.Scan(x) |
| 276 | return err |
| 277 | } |