节俭IDL:服务响应列表包含字典

时间:2019-06-14 07:28:02

标签: python thrift

我想得到节俭服务器的响应

响应为[{'a':'b','c': ['xxx','xxx']},{'a':'b','c': ['xxx','xxx']}]

我尝试这样写一个节俭的IDL,但是失败了


struct QcAccount {
    1:string username,
    2:string wangwang,
    3:string true_name,
    4:list<string> shop_list,
}



service RedisOperation {
    list<QcAccount> get_qc_account_shop(1:i64 company_id),
    bool get_redis_manager(1:i64 company_id),
}
and i got this error-msg:
 File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiothrift/protocol.py", line 140, in write_val
    for fid in iter(val.thrift_spec):
AttributeError: 'dict' object has no attribute 'thrift_spec'

我不知道如何从旧服务器上制作正确的数据

0 个答案:

没有答案