bpo-31553: add --json-lines option to json.tool (#10051)

* add jsonlines option to json.tool

* code review

* fix:avoid read infile after it close

* improve doc in whatsnew 3.8
diff --git a/Doc/library/json.rst b/Doc/library/json.rst
index 510e307..589e86c 100644
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -717,6 +717,12 @@
 
    .. versionadded:: 3.5
 
+.. cmdoption:: --json-lines
+
+   Parse every input line as separate JSON object.
+
+   .. versionadded:: 3.8
+
 .. cmdoption:: -h, --help
 
    Show the help message.