Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Aug 28, 2021
1 parent 19f71f8 commit c094125
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/source/console.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ The :meth:`~rich.console.Console.print_json` method will pretty print (format an

console.print_json('[false, true, null, "foo"]')

You can also *log* json by printing a :class:`~rich.json.JSON` object::
You can also *log* json by logging a :class:`~rich.json.JSON` object::

from rich.json import JSON
console.print_json(JSON('["foo", "bar"]'))
console.log(JSON('["foo", "bar"]'))

Because printing JSON is a common requirement, you may import ``print_json`` from the main namespace::

Expand Down

0 comments on commit c094125

Please sign in to comment.