The open source tool JSON Crack produces diagrams from json data. This is very helpful for learning to write code that produces json and for visualisation of complex json.
It is available as an online tool:
https://jsoncrack.com/editor
and for local installation as a Docker container:
https://github.com/AykutSarac/jsoncrack.com
P.S. the editor will also tell you if a json is valid.