EBPropertyMapper Class Reference
Inherits from | NSObject |
Declared in | EBPropertyMapper.h EBPropertyMapper.m |
Overview
The EBPropertyMapper class is used to associate the property names of a NSObject to the JSON property names.
For example, for a class defined as
Person(name, age)
And a JSON defined as
{ "jname" : "peter", "jage" : 35 }
A mapper can be defined as:
propertyMapper
=
@[@"name" : @"jname", @"age" : @"jage"];
Tasks
-
theClass
The class which this mapper is associated to.
property -
propertyMapper
Dictionary containing an equivalence between JSON and Class property names.
property -
– initWithClass:properties:
Returns a Property Mapper with the specified class and properties.
-
+ mapperWithClass:properties:
Properties
Class Methods
Instance Methods
initWithClass:properties:
Returns a Property Mapper with the specified class and properties.
- (id)initWithClass:(Class)aClass properties:(NSDictionary *)properties
Parameters
- aClass
The class to be mapped.
- properties
The class properties that must be mapped to another name.
Discussion
Returns a Property Mapper with the specified class and properties.
Declared In
EBPropertyMapper.h