Consider this code:
dt <- Sys.time()
dtl <- fromJSON(toJSON(unbox(dt),POSIXt="mongo"),FALSE)
Returns a list with a name $date and a big integer.
This can be fixed with:
as.POSIXct(dtl$'$date'/1000,origin="1970-01-01")
But it would be nice if fromJSON could note the {"$date":1234} structure and convert it back to POSIX datetime.
Consider this code:
Returns a list with a name
$dateand a big integer.This can be fixed with:
But it would be nice if
fromJSONcould note the{"$date":1234}structure and convert it back to POSIX datetime.