This seems to be a general issue with the lack of reflection in Motoko right now. The serialization libraries out there also suffer from this where you cant deserialize into a custom type with the exception of from_candid(candidValue).
If you know the Obj structure and its static then you can get away with it but anything dynamic seems to be an issue right now. Motoko wishlist - #8 by Gekctek