/** * Return a JSON representation of the constructed query. * <p> * The JSON representation is compatible with the {@link com.sindicetech.siren.qparser.tree.ExtendedTreeQueryParser}. * * @throws IllegalArgumentException If the created query object cannot be * converted to JSON. */ @Override public String toString() { final ObjectNode node = this.toJson(); try { return mapper.writerWithDefaultPrettyPrinter().writeValueAsString(node); } catch (final Exception e) { throw new IllegalArgumentException(e); } }