'''
Created on 17 fevr. 2017

@author: olivier.massot
'''
import json
import os

import yaml


def json_to_yaml(path, new_path):
    with open(path) as f:
        data = json.load(f)

    print(data)

    with open(new_path, "w") as f2:
        yaml.dump(data, f2, default_flow_style=False)


# json_to_yaml(r"C:\dev\access\Factures\setup.json", r"C:\dev\access\Factures\.amap.yaml")
with open(r"C:\dev\tests\test-amap-project\.amap.yaml") as f:
    print(yaml.load(f.read()))
