I need a JSON HTTP response to be as follows:
{date: "\/Date(1411084800000)\/"}
I have a python dict event
with a property date such that
event['date'] = "\/Date(1411084800000)\/"
Now when I return the dict using flask I am passing it through jsonify
. It is unfortunately escaping the single backslash and adding a double backslash to the JSON. \\/Date("1411084800000")\\/
. I need to get rid of the double back slash, how should I do this?
You are wondering why I would ever want to return a crazy result like this? Well that is how Kendo Scheduler expects date objects. See http://demos.telerik.com/kendo-ui/scheduler/index
Any help would be appreciated. Thanks!