How to encapsulate complex query objects into json data in flask?

the results queried with sqlalchemy contain other entity class objects and are stored in the sqlalchemy-related container. How to convert to json?

Mar.03,2021

this article is worth reading carefully-- oracle-based flask project (V)-- report download , in which there is a paragraph


that describes how to" json sqlalchemy data ". My approach is to generate a dictionary to store database objects, and finally return json.dumps (this dictionary)

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2b698-2ba99.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2b698-2ba99.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?