0

I have a backend that gives me a json response like this

{
    "compiler": {
        "type": "GCC",
        "version": "5.4"
    },
    "cpu": {
        "architecture": "x86_64",
        "count": 4
    }
}

I need to visualize this response in the form of a tree. What should I do? Maybe try to transform it to django-model? Or something else?

djkah11
  • 446
  • 5
  • 21

1 Answers1

0

If you just want it printed with indentation, the json module can already do this using dumps(), as shown here. Alternatively, you can use pprint.

ahota
  • 439
  • 5
  • 16