bpo-29636: json.tool: Add document for indentation options. (GH-17482)
And updated test to use subprocess.run
diff --git a/Lib/json/tool.py b/Lib/json/tool.py
index 5542ce4..6d7d9a0 100644
--- a/Lib/json/tool.py
+++ b/Lib/json/tool.py
@@ -33,7 +33,8 @@
parser.add_argument('--no-ensure-ascii', dest='ensure_ascii', action='store_false',
help='disable escaping of non-ASCII characters')
parser.add_argument('--json-lines', action='store_true', default=False,
- help='parse input using the jsonlines format')
+ help='parse input using the JSON Lines format. '
+ 'Use with --no-indent or --compact to produce valid JSON Lines output.')
group = parser.add_mutually_exclusive_group()
group.add_argument('--indent', default=4, type=int,
help='separate items with newlines and use this number '