code: func (cs Conditions) MarshalJSON() ([]byte, error) {
  	out := make(map[string]*jsonCondition, len(cs))
  	for k, c := range cs {
  		raw, err := json.Marshal(c)
  		if err != nil {
  			return []byte{}, errors.WithStack(err)
  		}
  
  		out[k] = &jsonCondition{
  			Type:    c.GetName(),
  			Options: json.RawMessage(raw),
  		}
  	}
  
  	return json.Marshal(out)
  }
docs: // MarshalJSON marshals a list of conditions to json.