diff --git a/Doc/library/json.rst b/Doc/library/json.rst --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -585,32 +585,34 @@ specified, :attr:`sys.stdin` and :attr:` } $ echo '{1.2:3.4}' | python -m json.tool Expecting property name enclosed in double quotes: line 1 column 2 (char 1) Command line options ^^^^^^^^^^^^^^^^^^^^ -.. cmdoption:: [] +.. cmdoption:: infile The JSON file to be validated or pretty-printed:: $ python -m json.tool mp_films.json [ { "title": "And Now for Something Completely Different", "year": 1971 }, { "title": "Monty Python and the Holy Grail", "year": 1975 } ] -.. cmdoption:: [] + If *infile* is not specified, read from :attr:`sys.stdin`. + +.. cmdoption:: outfile Write the output of the *infile* to the given *outfile*. Otherwise, write it to :attr:`sys.stdout`. .. cmdoption:: -h, --help Show the help message.