> On Jul 2, 2015, at 10:12 AM, Abhishek Srivastava <[email protected]>
> wrote:
>
> Could you please guide how to hold the CBLJSONEncoding class within
> CBLJSONEncoding dervied class?
An instance of CBLJSONEncoding is entirely responsible for creating its own
JSON encoding — CBLJSONEncoding is just a protocol, so it can’t help you with
the implementation at all.
If your implementation contains other objects that implement CBLJSONEncoding,
you’ll have to encode those objects yourself as part of the result you return,
probably by calling their -encodeAsJSON methods and incorporating the result.
> I am also not able to find proper example of NestedModeling. On how to use
> (Class)nsarrayitem{ return [NSArrayItemClassl class]; }
I’m not sure what you mean by that. Do you mean declaring the element types in
array properties
<http://developer.couchbase.com/mobile/develop/guides/couchbase-lite/native-api/model/index.html#arrays>?
Models don’t really nest; they just contain JSON data. Maybe you’re referring
to relationships between models, i.e. a property whose value type is a model
class or an array of models?
—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/9480D133-5C2E-4942-8379-AFC0BB6C9530%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.