evermeer / AlamofireJsonToObjects

An Alamofire extension which converts JSON response data into swift objects using EVReflection
Other
161 stars 28 forks source link

Empty objects after serialization #22

Closed edias closed 8 years ago

edias commented 8 years ago

When a JSON object returned from the server is different from the object expected on the client, the serialized object just make it empty and do not return any error.

For example:

Client object expected

class UserInformation:EVObject { var username: String? var password: String? }

Server object sent

{error:"An error message"}

Result

Result object returns with success, empty UserInformation and no errors

Expected

Result object returns with serialization error and nil Result.value

evermeer commented 8 years ago

This is an issue for EVReflection and will be handled here: https://github.com/evermeer/EVReflection/issues/77