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)

Menu