Introduced TypedObjectDeserializer to avoid code duplication

Change-Id: I03dbd3321a7ddb66651bf98c8129cd8365bc4483