You can’t use an instance of a custom class directly.
Room properties and room member properties have a special property properties
, and you can set custom properties in it, but there are some limitations on the available data types. You can’t store an instance of a custom class that your application defined. Instead, please use more general data types such as an array of integer or floating values. Or, you can serialize an object to a text format such as JSON and store it as a string data.