code: func evalSearchInput(in string) (*Constraint, error) {
  	if len(in) == 0 {
  		return nil, fmt.Errorf("empty expression")
  	}
  	if strings.HasPrefix(in, "{") && strings.HasSuffix(in, "}") {
  		cs := new(Constraint)
  		if err := json.NewDecoder(strings.NewReader(in)).Decode(&cs); err != nil {
  			return nil, err
  		}
  		return cs, nil
  	} else {
  		sq, err := parseExpression(context.TODO(), in)
  		if err != nil {
  			return nil, err
  		}
  		return sq.Constraint.Logical.B, nil
  	}
  }
docs: // EvalSearchInput checks if its input is JSON. If so it returns a Constraint constructed from that JSON. Otherwise
  // it assumes the input to be a search expression. It parses the expression and returns the parsed Constraint.