# Did '\[\]' change from object to array in 'response-\>withJson(\[\])'?

**URL:** <https://discourse.slimframework.com/t/did-change-from-object-to-array-in-response-withjson/4941>\
**Category:** Questions\
**Created:** [September 5, 2021, 7:02pm UTC](https://discourse.slimframework.com/t/did-change-from-object-to-array-in-response-withjson/4941 "2021-09-05T19:02:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![merricat](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@merricat](https://discourse.slimframework.com/u/merricat)\
**Post date:** [September 5, 2021, 7:02pm UTC](https://discourse.slimframework.com/t/did-change-from-object-to-array-in-response-withjson/4941/1 "2021-09-05T19:02:13Z")

</div>

I recently upgraded to slim 4, and I think my requests that expected to return an empty object `{ }` now return an empty array `[]`, specifically when using `$response->withJson([])`. Can anyone confirm this? Thanks.

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [September 7, 2021, 10:22am UTC](https://discourse.slimframework.com/t/did-change-from-object-to-array-in-response-withjson/4941/2 "2021-09-07T10:22:44Z")

</div>

As far as I know, it was always an array.
