Search code examples
swiftnsobject

Conflicting with parent property "description" in Swift


I'm using EVNetworkningObject of EVReflection library to serialize or deserialize json response from web service. It means I can't change the property name "description" as "description_" or something like that. At the same time, backend will not change their response property for me. How possibly can I fix this error?

enter image description here

The error message says

Getter for 'description' with Objective-C selector 'description' conflicts with getter for 'description' from superclass 'NSObject' with the same Objective-C selector


Solution

  • As vadian suggested in comments, I decided to use Codable protocol instead of EVReflection as Codable is way easy to use. I read this link for Codable and this video link for parsing json data.