我有一个解析请求列表字典的示例:
{
"shopping_cart": [{
"id": 23323,
"qty": 10
}, {
"id": 34232,
"qty": 9
}, {
"id": 34232,
"qty": 9
}]
}
我如何使用flask_restful RequestParser解析它?
使用这样的东西:)
self.postreqparse = reqparse.RequestParser()
self.postreqparse.add_argument("shopping_cart", type=dict, action="append")
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)