Ian Nicholas

Serializing Complex Python Data to JSON

Python has a JSON module that can serialize simple data structures like dictionaries to a JSON string. This comes in handy when you're serving up some content through AJAX. Unfortunately, your fancy Python data structure will sometimes contain objects that don't fit easily into JSON, and the parser won't even try to work with it.

Read more