Skip to content

Instantly share code, notes, and snippets.

@coseos
Created December 8, 2022 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coseos/da3b0b981d5d7af32529c32652048f37 to your computer and use it in GitHub Desktop.
Save coseos/da3b0b981d5d7af32529c32652048f37 to your computer and use it in GitHub Desktop.
#!/usr/bin/python3
import sys
import json
def print_json(file_path):
with open(file=file_path, mode='r') as read_file:
object = json.load(read_file)
pretty_object = json.dumps(object, indent=4)
print(pretty_object)
if __name__ == "__main__":
for i, arg in enumerate(sys.argv):
if i > 0:
print_json(arg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment