title: Any clever way to unescape data from JSON string?
body: <p>I am sending some <code>jsonrpc</code> requests to a <code>web2py</code> server, with a <code>celery</code> backend. Sometimes, I get errors which I want to analyze. The errors come escaped in the <code>jsonrpc</code> reply, so they are not easy to understand. I get something like this:</p>
  
  <pre><code>{"version": "1.1", "id": "ID4", "error": {"message": "TypeError: 'NoneType' object does not support item assignment", "code": 100, "data": ["  File \"/home/myuser1/tmp/web2py/gluon/tools.py\", line 4068, in serve_jsonrpc\n    s = methods[method](*params)\n", "  File \"/home/myuser1/tmp/web2py/applications/mycompany_portal/controllers/activity.py\", line 66, in get_cdr_page\n    invalidate_cache = pars['invalidate_cache'], use_long_polling = pars['use_long_polling'])\n", "  File \"/home/myuser1/projects/new-mycompany-portal/python_modules/pmq_client.py\", line 85, in get_page\n    res = result.get(timeout=10)\n", "  File \"/home/myuser1/.virtualenvs/python2.7.2-mycompany1/lib/python2.7/site-packages/celery/result.py\", line 119, in get\n    interval=interval)\n", "  File \"/home/myuser1/.virtualenvs/python2.7.2-mycompany1/lib/python2.7/site-packages/celery/backends/amqp.py\", line 138, in wait_for\n    raise self.exception_to_python(meta['result'])\n"], "name": "JSONRPCError"}}
  </code></pre>
  
  <p>What I want is to get the <code>error.data</code> part of the <code>jsonrpc</code> reply, unescape it and display it as a stacktrace. I can do it manually (change <code>\"</code> -> <code>"</code> and process the <code>\n</code>), but I would like to avoid reinventing the wheel here.</p>