Changes client creation to return json