You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My model used to work, now it failed in latest version of Mantle. My json data is from api.openweathermap.org, following is a snippet of the data.
weather = (
{
description = mist;
icon = 50n;
id = 701;
main = Mist;
}
);
The key caused the failure is weather.description. I noticed the serialization failed because of following code added into the initWithJSONDictionary:modelClass:error: method recently.
if (![value isKindOfClass:NSDictionary.class]) {
if (error != NULL) {
NSDictionary *userInfo = @{
NSLocalizedDescriptionKey: NSLocalizedString(@"Invalid JSON dictionary", @""),
NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"%@ could not be parsed because an invalid JSON dictionary was provided for key path \"%@\"", @""), modelClass, JSONKeyPath],
};
*error = [NSError errorWithDomain:MTLJSONAdapterErrorDomain code:MTLJSONAdapterErrorInvalidJSONDictionary userInfo:userInfo];
}
return nil;
}
Isn't this a defect?
The text was updated successfully, but these errors were encountered:
My model used to work, now it failed in latest version of Mantle. My json data is from api.openweathermap.org, following is a snippet of the data.
The key caused the failure is weather.description. I noticed the serialization failed because of following code added into the initWithJSONDictionary:modelClass:error: method recently.
Isn't this a defect?
The text was updated successfully, but these errors were encountered: