You can use certain Django built-in elements , but I always found that SimpleJSON makes things easier.
Why? With direct serialization, you donβt want to show everything. Thus, using the built-in methods you need to cut a lot. With the help of SimpleJSON you built a voice recorder, fill it only with what you want to show, and pump it through the SimpleJSON lib. I find inclusion much safer than exception when it comes to exposing an API.
It is also much more versatile for using data, since your client will not be a django site, it is an AIR application with its own ideas on how to format data (even within a specification such as JSON, it may and may be differences).
Oh, and remember that there is no date type in JSON. (I only mention this because it has hurt me in the past)
Edit: (Thanks Cide) Django sends SimpleJSON to django.utils.simplejson , but it may not be forever. Despite this, you can download it separately from Pypi
Oli
source share