code: func (p *condition) UnmarshalJSON(data []byte) error {
  	var d []json.RawMessage
  	if err := json.Unmarshal(data, &d); err != nil {
  		return err
  	}
  	if len(d) != 2 {
  		return errors.New("condition must be a list with two items")
  	}
  	if err := json.Unmarshal(d[0], &p.Condition); err != nil {
  		return err
  	}
  	m := map[string]variables{}
  	if err := json.Unmarshal(d[1], &m); err != nil {
  		return err
  	}
  	var ok bool
  	if p.Variables, ok = m["variables"]; !ok {
  		return errors.New("variables item is required in condition")
  	}
  	return nil
  }
docs: // UnmarshalJSON implements json.Unmarshaler interface.