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

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -