0

i am using SBJSON and Core Data for the first time. I have a an Entity like this :

myEntity {
NSString *contenu;
NSString *first;
NSString *previous;
}

I would like to create my JSON with this entity, and second question, i would like to store a JSON in my Entity Core Data ? thanks

Dave FN
  • 652
  • 1
  • 14
  • 29
samir
  • 4,501
  • 6
  • 49
  • 76

1 Answers1

0

Not sure what you mean by "store a JSON in my Entity Core Data`.

To convert an Entity into a JSON structure for sending out you can turn the entity into a NSDictionary. From there you can use SBJSON to turn that NSDictionary into a JSON string.

In this question I detailed how to do this. It is sample code but it explains how to get everything working.

Community
  • 1
  • 1
Marcus S. Zarra
  • 46,571
  • 9
  • 101
  • 182