func (c *Code) UnmarshalJSON(b []byte) error {
	// From json.Unmarshaler: By convention, to approximate the behavior of
	// Unmarshal itself, Unmarshalers implement UnmarshalJSON([]byte("null")) as
	// a no-op.
	if string(b) == "null" {
		return nil
	}
	if c == nil {
		return fmt.Errorf("nil receiver passed to UnmarshalJSON")
	}

	if ci, err := strconv.ParseUint(string(b), 10, 32); err == nil {
		if ci >= _maxCode {
			return fmt.Errorf("invalid code: %q", ci)
		}

		*c = Code(ci)
		return nil
	}

	if jc, ok := strToCode[string(b)]; ok {
		*c = jc
		return nil
	}
	return fmt.Errorf("invalid code: %q", string(b))
}
// UnmarshalJSON unmarshals b into the Code.
UnmarshalJSON unmarshals b into the Code.
// UnmarshalJSON unmarshals b into the Code .
func (c *Code) UnmarshalJSON(b []byte) error {
	if string(b) == "null" {
		return nil
	}
	if c == nil {
		return fmt.Errorf("nil receiver passed to UnmarshalJSON")
	}
	if ci, err := strconv.ParseUint(string(b), 10, 32); err == nil {
		if ci >= _maxCode {
			return fmt.Errorf("invalid code: %q", ci)
		}
		*c = Code(ci)
		return nil
	}
	if jc, ok := strToCode[string(b)]; ok {
		*c = jc
		return nil
	}
	return fmt.Errorf("invalid code: %q", string(b))
}
func ( c * Code ) UnmarshalJSON ( b [ ] byte ) error { if string ( b ) == " " { return nil } if c == nil { return fmt . Errorf ( " " ) } if ci , err := strconv . ParseUint ( string ( b ) , 10 , 32 ) ; err == nil { if ci >= _maxCode { return fmt . Errorf ( " " , ci ) } * c = Code ( ci ) return nil } if jc , ok := strToCode [ string ( b ) ] ; ok { * c = jc return nil } return fmt . Errorf ( " " , string ( b ) ) }
UnmarshalJSON unmarshals b into the Code.
UnmarshalJSON unmarshals b into the Code .
// From json.Unmarshaler: By convention, to approximate the behavior of // Unmarshal itself, Unmarshalers implement UnmarshalJSON([]byte("null")) as // a no-op.