我得到了错误
TypeError:无法序列化JSON
@app.route('/catalog/json')
def catalogJSON():
categories = session.query(Category).order_by(Category.name.asc())
return jsonify(Category=[c for c in categories]) code here
然后我把线路改成
^{pr2}$然后我得到AttributeError:“Category”对象没有属性“serialize”
我怎么能修好这个?谢谢。在
目前没有回答
相关问题 更多 >
编程相关推荐