How to jsonify objects from sqlalchemy?

后端 未结 6 692
离开以前
离开以前 2021-01-21 23:15

I\'m using Flask, SQLAlchemy and javascript. I need to pass the results of my query to javascript in the json format, through AJAX, but I keep getting this error:



        
6条回答
  •  日久生厌
    2021-01-22 00:15

    Based on TypeError: is not JSON serializable' it seems in your clouds_d dictionary has a Cloud object nested inside. please like print clouds_d

提交回复
热议问题