Hi all!
I'm working on a little chat program like Messenger for Android. I have done all accept the document for chat messages. I'm thinking of making a document per a chat, putin _id like name1+name2 of users in chat. How do I structure it?
I have something like this in mind:
{
"_id
": "goran got"
,
"_rev
": "1-9a1498590d3e3c5b06ae68efd55ddee6"
,
"messages": [
{
"name": "goran"
,
"
message
": "Some text"
}
,
{
"name": "maria"
,
"
message
": "Another text"
}
]
}
How can I create a document that has this structure from Android using LightCouch? In what will I put "name" and "message", and how that in "messages" in Android code? Is that map or array or list in Android?
Thanks in advance.