signature/policy_config.go
func (pr *prReject) UnmarshalJSON(data []byte) error {
	*pr = prReject{}
	var tmp prReject
	if err := paranoidUnmarshalJSONObjectExactFields(data, map[string]interface{}{
		"type": &tmp.Type,
	}); err != nil {
		return err
	}

	if tmp.Type != prTypeReject {
		return InvalidPolicyFormatError(fmt.Sprintf("Unexpected policy requirement type \"%s\"", tmp.Type))
	}
	*pr = *newPRReject()
	return nil
}
func (pr *prReject) UnmarshalJSON(data []byte) error {
	*pr = prReject{}
	var tmp prReject
	if err := paranoidUnmarshalJSONObjectExactFields(data, map[string]interface{}{
		"type": &tmp.Type,
	}); err != nil {
		return err
	}

	if tmp.Type != prTypeReject {
		return InvalidPolicyFormatError(fmt.Sprintf("Unexpected policy requirement type \"%s\"", tmp.Type))
	}
	*pr = *newPRReject()
	return nil
}
func ( pr * prReject ) UnmarshalJSON ( data [ ] byte ) error { * pr = prReject { } var tmp prReject if err := paranoidUnmarshalJSONObjectExactFields ( data , map [ string ] interface { } { " " : & tmp . Type , } ) ; err != nil { return err } if tmp . Type != prTypeReject { return InvalidPolicyFormatError ( fmt . Sprintf ( " \" \" " , tmp . Type ) ) } * pr = * newPRReject ( ) return nil }
// UnmarshalJSON implements the json.Unmarshaler interface.
UnmarshalJSON implements the json . Unmarshaler interface .