You can read this blog on using model classes and JSON on Android
http://jamiltz.github.io/simple-model-class-for-couchbase-lite-android/
James
On Wednesday, 2 December 2015 00:00:02 UTC, brijesh chavda wrote:
>
> I have following document structure.
>
>
> {
> id : "user1",
> "foods":
> [
> { "id": "1001", "type": "Regular" },
> { "id": "1002", "type": "Chocolate" },
> { "id": "1003", "type": "Blueberry" },
> { "id": "1004", "type": "Devil's Food" }
> ]
> }
>
>
> I cant seem to figure out, how to use this in android using couchbase-lite
> for android.
>
> This is my Pojo structure currently , which represents this document.
>
>
> class User{
> private String id;
> private ArrayList<Food> foods;
> }
>
> class Food{
> private String id;
> private String type;
> }
>
> Is this right mapping?
>
>
> Any example link on github is really appreciated.
>
> Thanks,
> Brijesh
>
--
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/458431bb-1830-4cd4-9c39-975ad1559211%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.