After retrieving data from a REST service, I encountered the following JSON structure:
{
"data":{
"virt":false,
"someValue":"0.0",
"dateFrom":new Date(1519772400000),
"anotherValue":""
}
}
I am unsure how to properly handle fields containing the new Date(1519772400000)
object during parsing. Neither JSON.parse()
nor response.json()
seem to be effective for this task. My ultimate goal is to create an object based on the received JSON data.
If anyone has suggestions for a straightforward method of parsing this information without resorting to creating a specialized parser or resorting to regular expressions, your input would be greatly appreciated.
Thank you.