def search_json(self, fields=None, query=None):
        """Search for entities.

        Call :meth:`search_raw`. Check the response status code, decode JSON
        and return the decoded JSON as a dict.

        .. WARNING:: Subclasses that override this method should not alter the
            ``fields`` or ``query`` arguments. (However, subclasses that
            override this method may still alter the server's response.) See
            :meth:`search_normalize` for details.

        :param fields: See :meth:`search`.
        :param query: See :meth:`search`.
        :return: A dict. The server's response, with all JSON decoded.
        :raises: ``requests.exceptions.HTTPError`` if the response has an HTTP
            4XX or 5XX status code.
        :raises: ``ValueError`` If the response JSON can not be decoded.

        """
        response = self.search_raw(fields, query)
        response.raise_for_status()
        return response.json()