- changed status to closed
why can not support sqlalchemy list object to json?
Issue #3672
closed
I got tired,i have class model for convert json but not work any things for this,because i have relationship on my model , why there is not any function for convert list object for convert json in sqlalchemy?
class sample(Base):
__tablename__ = 'reltest'
id = Column(Integer, primary_key=True)
name = Column(String(50))
fullname = Column(String(50))
password = Column(String(50))
parent_id = Column(Integer, ForeignKey('reltest.id'),index=True)
children = relationship(lambda: Student, remote_side=[id])
hashid = None
Comments (2)
-
repo owner -
reporter Yes Yes Very Nice SQLAlchemy-JSONAPI ! I Love You !
- Log in to comment
Hello -
JSON serialization is a concern outside of SQLAlchemy itself which is only concerned with mapping things to databases. There are many JSON serializer libraries for Python objects, but there are also some specific to SQLAlchemy such as alchemyjsonschema which will give you a JSON schema that can help with rendering as JSON, as well as SQLAlchemy-JSONAPI which renders SQLAlchemy-mapped objects straight to JSON.