# Sending a message in form of a class?

**URL:** https://forum.heroiclabs.com/t/sending-a-message-in-form-of-a-class/4071
**Category:** Client Libraries
**Tags:** sdk-unity
**Created:** [July 15, 2023, 7:32am UTC](https://forum.heroiclabs.com/t/sending-a-message-in-form-of-a-class/4071 "2023-07-15T07:32:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![aliakbarm534](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/aliakbarm534/32/1716_2.png) [@aliakbarm534](https://forum.heroiclabs.com/u/aliakbarm534)
#### Post date: [July 15, 2023, 7:32am UTC](https://forum.heroiclabs.com/t/sending-a-message-in-form-of-a-class/4071/1 "2023-07-15T07:32:53Z")

</div>

Let’s say I have a MyClass contains 3 variable of strings. And instead of  
`var content = new Dictionary<string, string> {{"hello", "world"}}.ToJson();` I want it to be `var content = new Dictionary<string, MyClass> {{"hello", myClass}}.ToJson();`. But I don’t see any object parameter in IApiChannelMessage to be serialized from Json later. Is it possible to achieve something like this?

---

<div class="post-metadata">

### Author: ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)
#### Post date: [July 17, 2023, 9:38am UTC](https://forum.heroiclabs.com/t/sending-a-message-in-form-of-a-class/4071/2 "2023-07-17T09:38:41Z")

</div>

Related to [Unity crashes when I tried the TinyJson from Nakama - #2 by aliakbarm534](https://forum.heroiclabs.com/t/unity-crashes-when-i-tried-the-tinyjson-from-nakama/4075/2)
