Show Json With Line Breaks?

Its possible to see Json in Pycharm console with linea breaks? Something like

{
    "glossary": {
        "title": "example glossary",
		"GlossDiv": {
            "title": "S",
			"GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
					"SortAs": "SGML",
					"GlossTerm": "Standard Generalized Markup Language",
					"Acronym": "SGML",
					"Abbrev": "ISO 8879:1986",
					"GlossDef": {
                        "para": "A meta-markup language, used to create markup languages such as DocBook.",
						"GlossSeeAlso": ["GML", "XML"]
                    },
					"GlossSee": "markup"
                }
            }
        }
    }
}

Instead of all Json in same Line?

1
3 comments

This is, in fact, how it's supposed to be formatted out of the box.

Could you make sure that your JSON file type settings are correct?

 

0
Avatar
Permanently deleted user

Sorry for late answer but isnt a json file, is pycharm console print, a http api response printed in pycharm console

0

There is no such feature in PyCharm. It should be done in your code.
Perhaps you could try these examples: https://stackoverflow.com/questions/23718896/pretty-print-json-in-python-pythonic-way

0

Please sign in to leave a comment.