code: public String toJson() {
          try {
              return JsonSerializer.toString(this);
          } catch (Exception e) {
              String message = String.format("Unformateable JSON search: %s", e.getMessage());
              Log.error(e, message);
              throw new IllegalArgumentException(message, e);
          }
      }
docs: Returns the JSON representation of this object.
  
  @return the JSON representation of this object.