I am running Python script to get data as dict (json) how can I convent this Json dict to yaml without reading / writing to a file.
just to convent Json object to YAML object. thanks
I am running Python script to get data as dict (json) how can I convent this Json dict to yaml without reading / writing to a file.
just to convent Json object to YAML object. thanks
import simplejson
import sys
import yaml
print yaml.dump(simplejson.loads(str(sys.stdin.read())), default_flow_style=False)
Python one-liner: converting JSON to YAML Check this: https://blog.jasoncallaway.com/2015/10/11/python-one-liner-converting-json-to-yaml/