I would like to use JSON in my application, i have not never use it. i have an object like this :
@interface Selection : NSManagedObject
@property (nonatomic, retain) NSString * book_id;
@property (nonatomic, retain) NSString * contenu;
@property (nonatomic, retain) NSNumber * page_id;
@property (nonatomic, retain) NSNumber * nbrOfOccurences;
@property (nonatomic, retain) NSString * next;
@property (nonatomic, retain) NSString * previous;
@end
I would like to construct the JSON to synchronize to my server. What is the structure to use of my objects "Selection", i.e. : How to represent many objects of "Selection" in JSON format ? thanks for your answers.
Do this:
Now
jsonDatacontains a JSON-encoded representation of theobjectsarray. To get them back, reverse the process: