Parsing JSON
import json
data = json.loads(json_string)
Dumping complex structures
import json
print json.dumps(something)
Convert YAML to JSON
import yaml, json
with open('./file.yaml') as f:
print(json.dumps(yaml.load(f)))
import json
data = json.loads(json_string)
import json
print json.dumps(something)
import yaml, json
with open('./file.yaml') as f:
print(json.dumps(yaml.load(f)))