def execute():
    args = parseArgs()
    obj = json.loads(args.jsonfile.read())
    args.jsonfile.close()

    info = guessTypenameForDict(obj)
    typename = resolveStructName(args)

    if args.apikit:
        param = args.parameter
        if not param:
            param = ',' + (args.classname or typename)
        print('struct %s: ClassInit, APIKitHelper, Request { // router:"%s"' % (typename, param))
        print('	typealias APIKitResponse = %sResponse' % (typename,))
        print('')
        printClass(info, typename + 'Response', 1)
        print('}')
    else:
        printClass(info, typename)
dataset/ETHPy150Open safx/swift-idl/json2idl.py/execute/original