I am writing an endpoint and would like to return a json with various objects that retain its original type, ie `Int` or `Date`. However my implementation simply converted them to `string`. 

```
module.exports = functions.https.onRequest((req, res) => {
    let query = req.query
    return getContents()
    .then((contents) => {
        let jsonObject = {
            articles: contents
        }
        return res.json(jsonObject)
    })
}

```

The `contents` above is an array of objects like so:

```
{
    date_created: 2020-05-15T00:00:00.000Z,
    read_count: 10
    //Other attributes with string values
}

```

After receiving the `json` object in front-end, the `date_created` and `read_count` has morphed into strings like so:

```
{
    date_created: "2020-05-15T00:00:00.000Z",
    read_count: "10"
    //Other attributes with string values
}

```

I have attempted the following but still strips the types off:

```
let jsonObject = {
    articles: JSON.stringify(contents)
}

let jsonObject = JSON.stringify({
    articles: contents
})

```

How can I retain the `Date` and `Int` object types in the returned json?