I am trying to print a json dump onto multiple lines. Currently it is printing on one line.
Here are the steps I am attempting;
Step 1: This is the code that I want to print
payload = json.dumps({"ip-detunnel": "No",
"name": "DP800 Slot 1",
"vlan-tag-insertion": "No",
"vlan-tag-remove-forward": "Remove",
"mac-replace-header": "No",
"mpls-label-stack": "Pass Through"
})
Step 2: This is how I am trying to print
print '\n' + payload
Step 3: Here is the Result:
{"vlan-tag-insertion": "No", "name": "DP800 Slot 1", "mpls-label-stack": "Pass Through", "vlan-tag-remove-forward": "Remove", "ip-detunnel": "No", "mac-replace-header": "No"}
My goal is to print the results on multiple lines so that it looks like the json.dumps in step 1