JSON from Python mysqldb

jpuopolo puopolo at gmail.com
Tue Aug 26 22:43:41 EDT 2008


On Aug 26, 3:15 pm, Larry Bates <larry.ba... at vitalEsafe.com> wrote:
> jpuopolo wrote:
> > All:
>
> > I am using Python to read some records from the MySQL database. I am
> > using the mysqldb library, and things are working well.
>
> > Now, I would like to pass back the results of the query to a Web-based
> > front end, and I would like to use JSON. Is there a library/example of
> > creating a JSON array from a mysqldb row or row set?
>
> > Thanks,
> > jpuopolo
>
> Google turns up several high quality links, just look for 'python json'.
>
> -Larry

Larry:

Thank you for the reply. Unfortunately, some of the libs the Google
search returns bail when
converting a database record into a JSON object. I may be using it/
them incorrectly, so I'll post
results to this newsgroup accordingly.

Best,
John



More information about the Python-list mailing list