def create_miriam_json():
    """ Parses the latest miriam information.

    :return:
    """
    import xmlschema
    import json
    from pprint import pprint
    xs = xmlschema.XMLSchema('./resources/MiriamXML.xsd')
    d = xs.to_dict('./resources/IdentifiersOrg-Registry.xml')
    datatypes = {}
    for entry in d['datatype']:
        datatypes[entry['namespace']] = {'id': entry['@id'], 'pattern':
            entry['@pattern'], 'name': entry['name'], 'namespace': entry[
            'namespace'], 'definition': entry['definition']}
    with open('./resources/IdentifiersOrg-Registry.json', 'w') as fp:
        json.dump(datatypes, fp)
