UnmarshalJSON correctly deserializes a NullProjectStatus from JSON.
(b []byte)
| 228 | |
| 229 | // UnmarshalJSON correctly deserializes a NullProjectStatus from JSON. |
| 230 | func (n *NullProjectStatus) UnmarshalJSON(b []byte) error { |
| 231 | n.Set = true |
| 232 | var x interface{} |
| 233 | err := json.Unmarshal(b, &x) |
| 234 | if err != nil { |
| 235 | return err |
| 236 | } |
| 237 | err = n.Scan(x) |
| 238 | return err |
| 239 | } |
| 240 | |
| 241 | type NullProjectStatusStr struct { |
| 242 | NullProjectStatus |