Restkit Serializing a Boolean from NSNumber
- by angelokh
One of managed objects has one attribute 'isMember' represented by NSNumber type. When serialize to Json post body by RestKit, it always give 0/1 instead of YES/NO or true/false. When mapping from json result to objects, RestKit is able to successfully turn YES/NO to NSNumber. What is the way to force serialize the boolean attribute to YES/NO or true/false?
Serialize: 0 -> 0, 1 -> 1
Deserialize : YES/true -> 1, NO/false -> 0