json_prolog client returns dict instead of string.
Better exception handling in json_prolog.