CM-16551: correctly apply deserialization settings
CM-16551: enable generic type to be deserialized
CM-16551: override toString for nicer error logging