Currently, it's not possible to serialize/deserialize correctly the inventory of an object. Or at least you can, but it would take a long time to actually achieve it.
It's would be really to cool to expose the inventory serializing/deserializing function, that used at the engine side.
Return an array of int to represent all the bytes for example, for the deserializing function, or maybe put a serializer as input.
It would be really useful when you use a 3rd party software and you want to save/load inventory of a vehicle or something that has inventory, without creating your own one.