So what's the point of - (id)initWithJSON:(id)jsonObject and - 
(id)encodeAsJSON then?  In my mind conforming to the CBLJSONEncoding and 
implementing these methods would allow my object to be automatically 
serialized somehow, I just don't know how :-)  

On Tuesday, June 3, 2014 10:13:57 PM UTC-5, Jens Alfke wrote:
>
> +[CBLJSON dataWithJSONObject:] is just a wrapper around 
> NSJSONSerialization, which only knows how to serialize the standard types 
> (NSString, NSArray, etc.) 
>
> If you want to get a JSON-serializable form of a CBLModel, call 
> -propertiesToSave on it. Then you can collect those into an NSArray and 
> turn that into JSON. 
>
> —Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/8c88b8ae-90cc-49ca-a1a4-a975eaa727bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to