We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey,
Just wondering if Realm-JSON can use a property's default value instead of trying to assign NSNull to the property which is causing Realm to crash?
Thanks! Dru
The text was updated successfully, but these errors were encountered:
Sounds like valid proposition. Mind submitting a PR?
Sorry, something went wrong.
If you're using AFNetworking and you're using AFHTTPSessionManager to make your calls, you can do this:
_manager = [[AFHTTPSessionManager alloc] initWithBaseURL:url]; AFJSONResponseSerializer *responseSerializer = [AFJSONResponseSerializer serializer]; [responseSerializer setRemovesKeysWithNullValues:YES]; _manager.responseSerializer = responseSerializer;
This will remove keys that have null values. Then your models should use the default values since the keys with null values are no longer there.
No branches or pull requests
Hey,
Just wondering if Realm-JSON can use a property's default value instead of trying to assign NSNull to the property which is causing Realm to crash?
Thanks!
Dru
The text was updated successfully, but these errors were encountered: