Skip to content

Mac Application to format json and create model properties from the JSON for RestKit(https://github.com/RestKit/RestKit)

License

Notifications You must be signed in to change notification settings

mohshin-shah/RestKitModelHelper

Repository files navigation

JSON Formatter and RestKit Model Mapping

Mac Application to create model properties from the JSON for RestKit(https://github.com/RestKit/RestKit)

Pasting raw JSON

Formatting JSON

Getting the properties list

Searching a nested JSON dictionary also works. For example fetching only Users properties

Use the properties in User.h and mapping data in User.m as below.

In User.h

  @property (nonatomic ,strong) NSString *address;
  @property (nonatomic ,strong) NSString *work;
  @property (nonatomic ,strong) NSString *city;
  @property (nonatomic) NSNumber *id;
  @property (nonatomic ,strong) NSString *dob;
  @property (nonatomic) NSNumber *optedin;
  @property (nonatomic ,strong) NSString *email;
  @property (nonatomic ,strong) NSString *name;

And in User.m or anywhere else when you need the mapping

	RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[self class]];
  [mapping addAttributeMappingsFromDictionary:@{
        @"address" : @"address",
        @"work" : @"work",
        @"city" : @"city",
        @"id" : @"id",
        @"dob" : @"dob",
        @"optedin" : @"optedin",
        @"email" : @"email",
        @"name" : @"name"
	 }];

There are many known issues there.Please use this for the faster development for json mapping.

About

Mac Application to format json and create model properties from the JSON for RestKit(https://github.com/RestKit/RestKit)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published