code: func (c *Criteria) UnmarshalJSON(input []byte) error {
  	type Criteria struct {
  		SymKeyID     *string        `json:"symKeyID"`
  		PrivateKeyID *string        `json:"privateKeyID"`
  		Sig          *hexutil.Bytes `json:"sig"`
  		MinPow       *float64       `json:"minPow"`
  		Topics       []TopicType    `json:"topics"`
  		AllowP2P     *bool          `json:"allowP2P"`
  	}
  	var dec Criteria
  	if err := json.Unmarshal(input, &dec); err != nil {
  		return err
  	}
  	if dec.SymKeyID != nil {
  		c.SymKeyID = *dec.SymKeyID
  	}
  	if dec.PrivateKeyID != nil {
  		c.PrivateKeyID = *dec.PrivateKeyID
  	}
  	if dec.Sig != nil {
  		c.Sig = *dec.Sig
  	}
  	if dec.MinPow != nil {
  		c.MinPow = *dec.MinPow
  	}
  	if dec.Topics != nil {
  		c.Topics = dec.Topics
  	}
  	if dec.AllowP2P != nil {
  		c.AllowP2P = *dec.AllowP2P
  	}
  	return nil
  }
docs: // UnmarshalJSON unmarshals type Criteria to a json string