From bb79396571da04b39f86df3db2b7623f914ca236 Mon Sep 17 00:00:00 2001 From: LighghtEeloo Date: Sat, 23 Jan 2021 14:23:11 +0800 Subject: [PATCH] fix: json_format dump. --- ig/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ig/main.py b/ig/main.py index 31a9059..f06a30d 100644 --- a/ig/main.py +++ b/ig/main.py @@ -6,6 +6,7 @@ import logging import os import sys +from json import dumps as json_dumps from ig import colors, graph, serve, walk @@ -121,7 +122,7 @@ def make_json(args, graph_json): The payload. ''' if args.json: - print(graph_json) + print(json_dumps(graph_json, indent=4)) sys.exit(0) # Additional settings to configure the visualization