nathanday / ndjson

Objective-C JSON parser
1 stars 0 forks source link

Switching between parse to custom object to parse to CoreData model #47

Open nathanday opened 11 years ago

nathanday commented 11 years ago

NDJSONRequest will parse the entire json request, for CoreData this is an issue because what you actually want put into your store is often a subtree. If we could switch between parsing to custom object to parsing to CoreData model that would provide a way to fix the issue. We can already switch from event driven parsing to another parsing method and back agains, so we just need to find a way to let the parser know the type of parsing has changes for a key. Maybe a CodeData models for keys method like the class for keys and property names for keys.

nathanday commented 10 years ago

Could automatically do this by testing if an object is a subclass of NSManagedObject.