Created
January 25, 2019 11:08
-
-
Save d10xa/df1ebf279a5041feebc80b954002c98d to your computer and use it in GitHub Desktop.
Wraps json from stdin into string field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json, sys; print(json.dumps({sys.argv[1] if len(sys.argv) > 1 else 'data': json.dumps(json.loads(sys.stdin.read()), ensure_ascii=False)}, ensure_ascii=False)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wrap:
expand: