-1
Flaskのjsonify
をデータ構造体にコールしようとしていますが、TypeError: unorderable types: str() < builtin_function_or_method()
が返されます。このエラーを修正するにはどうすればよいですか?PythonでJSONにデータ構造をダンプするとstrとbuiltin_function_or_methodが発生する
bucketlists = [{
'id': 1,
'name': "BucketList1",
'items': [{
id: 1,
'name': "I need to do X",
'date_created': "2015-08-12 11:57:23",
'date_modified': "2015-08-12 11:57:23",
'done': False
}],
'date_created': "2015-08-12 11:57:23",
'date_modified': "2015-08-12 11:57:23",
'created_by': "1113456"
}]
@app.route('/bucketlists/', methods=['GET'])
def get_bucketlists():
return jsonify({'bucketlists': bucketlists})