Skip to content

These classes are for replacing NSNull objects from Arrays and Dictionaries when parsing API responses.

Notifications You must be signed in to change notification settings

bismasaeed00/NullReplacer

Repository files navigation

NullReplacer

These classes are for replacing NSNull objects from Arrays and Dictionaries when parsing API responses.

How To Install

Download these files and add in your project.

import like this in your project:

#import "NSArray+NullReplacement.h"
#import "NSDictionary+NullReplacement.h"

How to use:

NSDictionary *data=@{@"status":201,@"message":null};
data=[data dictionaryByReplacingNullsWithBlanks];

output will be

@{@"status":201,@"message":@""}

It will remove all Null objects and replace them with empty strings to avoid crashes in your app.

About

These classes are for replacing NSNull objects from Arrays and Dictionaries when parsing API responses.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published