dump-as-json.py: add tool to dump server output as JSON