# JSONObject cannot be cast to class java.io.Serializable

**URL:** <https://forum.inductiveautomation.com/t/jsonobject-cannot-be-cast-to-class-java-io-serializable/41248>\
**Category:** Module Development\
**Created:** [December 6, 2020, 9:11pm UTC](https://forum.inductiveautomation.com/t/jsonobject-cannot-be-cast-to-class-java-io-serializable/41248 "2020-12-06T21:11:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 6, 2020, 9:22pm UTC](https://forum.inductiveautomation.com/t/jsonobject-cannot-be-cast-to-class-java-io-serializable/41248/2 "2020-12-06T21:22:28Z")

</div>

The RPC system requires anything being sent between client/gateway to implement `java.io.Serializable`. `JSONObject` doesn’t, so it’s not something your’ll be able to return from your function if the result will be RPC’d to the client.

---

_[View the full topic](https://forum.inductiveautomation.com/t/jsonobject-cannot-be-cast-to-class-java-io-serializable/41248)._
