B
B
beduin012018-03-15 16:07:48
Python
beduin01, 2018-03-15 16:07:48

What is the best way to convert DB response to JSON?

I need to serialize the DB response in JSON. What is the correct way to do this in Python?
Here I am making a request: Here I can convert `u` to Json, but what if I have a selection of a set of values ​​like .all()?
u = sess.query(Users).filter(Users.id==42).one()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Astrohas, 2018-03-15
@Astrohas

https://blogs.gnome.org/danni/2013/03/07/generatin...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question