Wiki Navigation

Here's a tool that will help CP handle JSON.
If a POST or PUT request has a Content-Type of "application/json", this will take the request body and turn it into a Python object using simplejson, and pass it to the handler as params['JSON'].

If a GET request has an Accept header of "application/json", this will take whatever you return from the handler and turn it into a JSON string and return that instead.