i'll suggest you to follow the some dictionary formates

Map<String, Object> mapAuditProperties = new HashMap<String, Object>();
mapAuditProperties.put(DATES, getDateKeyValue());

/**
     * To get dateKey HashMap
     * @return  datesmap
     */
    private Object getDateKeyValue(){        
        HashMap<String, String> datesmap = new HashMap<String, String>();
        datesmap.put(CREATIONDATE, edAudits.getCreationDate());
        datesmap.put(LASTMODIFIEDDATE, edAudits.getLastModifiedDate());
        return datesmap;
    }




On Friday, March 6, 2015 at 6:01:39 AM UTC+5:30, [email protected] 
wrote:
>
>
> (Using xamarin lite, C# but general couchbase lite question)
>
> Couchbase document.properties is IDictionary<String, Object> properties. 
> Objects in business logic layer have different representations of course, 
> and include nested members, also arrays etc (not trivial 1 level key-value 
> types). 
>
> In order to update a document, I can serialize my objects to JObject  or 
> just json string but I don't want to handcraft each type to convert it to 
> dictionaries. I dont see anything in API besides IDictionary<String, 
> Object> properties.
>
>
> Is there a way to update/create document by giving it json (and not 
> IDictionary)?
>
> Note:
> The opposite direction, ie retrieving document properties into json, is ok 
> for me because JObject.FromObject(document.properties) is correctly 
> handling Couchbase IDictionary<string, object> from coucbhase document and 
> so i can correctly deserialize results into my types.
>

-- 
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/7b58f52d-8d06-42c0-a6f8-e96e766ac7ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to