I have a document like that:
{
id :1,
type : "post",
title =: "Firt Post",
content : "This is first post to this blog",
author : "Sonnt",
comments : [
{
id : 1,
comment : "This is a comment 1"
},
{
id : 2,
comment : "This is a comment 2"
}
]
}
And i use .NET client 2.1 to insert to couchbase server, following : http://docs.couchbase.com/developer/dotnet-2.1/hello-couchbase.html
var result = bucket.Insert(new Document<dynamic>
{
Id = "test_doc_01",
Content = new
{
id = 1,
type = "post",
title = "Firt Post",
content = "This is first post to this blog",
author = "sonnt",
comments = [
{
id = 1,
comment = "this a comment 1"
},
{
id = 2,
comment = "this a comment 2"
}
]
}
});
But i get error. What is right format for this document.