diff options
Diffstat (limited to 'bin/dev_tools/dump_jason.sh')
-rwxr-xr-x | bin/dev_tools/dump_jason.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/bin/dev_tools/dump_jason.sh b/bin/dev_tools/dump_jason.sh new file mode 100755 index 00000000..5e57b088 --- /dev/null +++ b/bin/dev_tools/dump_jason.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 +# +# ex:ts=4:sw=4:sts=4:et +# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- +# +# Security Response Tool Implementation +# +# Copyright (C) 2017-2018 Wind River Systems +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +import json +import os +import sys + +with open('filename.txt', 'r') as handle: + parsed = json.load(handle) + print(json.dumps(parsed, indent=4, sort_keys=True))
\ No newline at end of file |