# \#laminas-json

**URL:** https://discourse.laminas.dev/tag/laminas-json/118.md

[Latest](https://discourse.laminas.dev/latest.md) · [Categories](https://discourse.laminas.dev/categories.md) · [Tags](https://discourse.laminas.dev/tags.md)

---

## [Json:serialize should get DateTime object as string](https://discourse.laminas.dev/t/json-serialize-should-get-datetime-object-as-string/3660)

<div class="topic-metadata">

**Author:** [@modir](https://discourse.laminas.dev/u/modir)\
**Replies:** 5\
**Last updated:** [April 4, 2024, 2:27pm UTC](https://discourse.laminas.dev/t/json-serialize-should-get-datetime-object-as-string/3660 "2024-04-04T14:27:57Z")

</div>

I have here an object and one of its properties is a DateTime object. Now I want to use Json::serialize() to get the JSON representation of it. Is there a way to instruct Json::serialize() to get the DateTime object as a…
