Emit well formatted json when -q given with -w