added reflection to overloaded deserialize method on Resource class