You could use JSON, but then you can't use functions like in your example. I think it would be best to create an ID or handle to these complex objects, such as a number or string of random characters, and use the objects in terms of that. For example you could have a set of expressions to get each property from the ID.