Thanks for the reply.
To confirm one thing about "only types that can be converted to JSON".
Suppose I have a class like:
public class User {
public String name;
public Address address ;
}
public class Address { public String line ; }
The User can be converted to JSON, so I think the following should work
well, right?
User u = new User() ;
// ....assign some values to the instance
document.putProperties( "somekey", u ) ;
Thanks again.
On Tue, Jan 27, 2015 at 12:31 AM, Jens Alfke <[email protected]> wrote:
>
> On Jan 26, 2015, at 1:16 AM, Guofeng Zhang <[email protected]> wrote:
>
> The map's key is String, but what type of the map's value allowed here?
> Could it be any complex Java class?
>
>
> Documents are stored as JSON, so only types that can be converted to JSON
> — booleans, numbers, strings, and arrays or maps of those (maps have to
> have strings as keys.)
>
> —Jens
>
> PS: And JSON has a "null" value, but I don't know if Java has an object
> for that (it's not the same as a null pointer!)
>
> --
> 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/12C9F656-4416-40D8-9F6D-11908BABC950%40couchbase.com
> <https://groups.google.com/d/msgid/mobile-couchbase/12C9F656-4416-40D8-9F6D-11908BABC950%40couchbase.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
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/CAMpUGn1GQGZx-MBOiYi%2BbxmQo2XJOorJ0af1fxaiGTq3XVUyng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.