Parsing JSON with a Javascript Date object in Ruby -


i using soap api returns xml json strings within response envelope. of api calls has not been problem there 1 returns javascript new date objects causing problems when using json.parse. here simplified example of response getting.

"{\"history\":[ {\"timestamp\":new date(1380024020923)}]}"

when using json.parse following error.

json::parsererror: 399: unexpected token @ '{"timestamp":new date(1380024020923)}]}'

is there nice way parse string or going have use regex/string trickery? has come across way of returning date object , understand advantage?


Comments

Popular posts from this blog

mongodb - Struggling to get ordered results from the last retrieved article, given array of elements to search in -

c# - Pausing a storyboard on TabItem mouse over -

c# - Attribute value in root node of xml Linq to XML -