def METHOD_NAME(schema_file, out_dir=None):
    ldif_parser = myLdifParser(schema_file)
    ldif_parser.parse()
    jans_schema = OrderedDict((('attributeTypes',[]), ('objectClasses',[])))
    if 'attributeTypes' in ldif_parser.entries[0][1]:
        for attr_str in ldif_parser.entries[0][1]['attributeTypes']:
            attr_type = AttributeType(attr_str)
            attr_dict = {
                      "desc": attr_type.tokens['DESC'][0],
                      "equality": attr_type.tokens['EQUALITY'][0],
                      "names": list(attr_type.tokens['NAME']),
                      "multivalued": False,
                      "oid": attr_type.oid,
                      "syntax": attr_type.tokens['SYNTAX'][0],
                      "x_origin": attr_type.tokens['X-ORIGIN'][0]
                    }
            if 'X-RDBM-ADD' in attr_type.tokens and attr_type.tokens['X-RDBM-ADD'][0]:
                attr_dict['sql'] = {'add_table': attr_type.tokens['X-RDBM-ADD'][0]}
            jans_schema['attributeTypes'].append(attr_dict)
    object_class_list = []
    for el in ldif_parser.entries:
        if 'objectClasses' in el[1]:
            object_class_list += el[1]['objectClasses']
    for objcls_str in object_class_list:
        objcls_type = ObjectClass(objcls_str)
        objcls_dict = {
              "kind": "AUXILIARY",
              "may": list(objcls_type.tokens['MAY']),
              "names": list(objcls_type.tokens['NAME']),
              "oid": objcls_type.oid,
              "sup": list(objcls_type.tokens['SUP']),
              "x_origin": objcls_type.tokens['X-ORIGIN'][0] 
            }
        if objcls_type.tokens['X-RDBM-IGNORE'][0].lower() in ('true', 'yes', 'ignore', 'ok'):
            objcls_dict['sql'] = {"ignore": True}
        jans_schema['objectClasses'].append(objcls_dict)
    path, fn = os.path.split(schema_file)
    if not out_dir:
        out_dir = path
    if not os.path.exists(out_dir):
        os.makedirs(out_dir)
    name, ext = os.path.splitext(fn)
    out_file = os.path.join(out_dir, name + '.json')
    schema_str = json.dumps(jans_schema, indent=2)
    with open(out_file, 'w') as w:
        w.write(schema_str)
    return out_file