#!/usr/bin/env python3
# Convert json to yaml

import json
import yaml
import sys

__title__ = 'json to yaml converter'
__version__ = '1.0.0'
__author__ = 'Jason Gardner <buhrietoe@gmail.com>'


class json2yaml(object):
    def __init__(self):
        print(self.convert(sys.stdin))

    def convert(self, data):
        yamlData = yaml.safe_dump(json.loads(data.read()), default_flow_style=False)
        return yamlData


if __name__ == '__main__':
    json2yaml()
