client: fix segfault for !json output