class QueryParser {

	public Query parse(final String query) throws JsonException, NoSuchElementException {

		if ( query == null ) {
			throw new NullPointerException("null query");
		}

		return query.isEmpty() ? items(shape)
				: query.startsWith("%7B") ? json(decode(query))
				: query.startsWith("{") ? json(query)
				: form(query);

	}

	  QueryParser(final String base, final Shape shape, final Format<?> format);

}