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
Post a Comment