February 2015
Intermediate to advanced
170 pages
3h 39m
English
Now that we've examined Couchbase Server's key/value API, it's time to shift gears and look at its document-oriented features.
Documents in Couchbase are simply key/value pairs where the value is stored as a valid JSON document. The key/value API we learnt in Chapter 2, Using Couchbase CRUD Operations, is the same API we'll use to create JSON documents in the server. Generally, you'll use the client SDKs in combination with your platform's preferred JSON serializer, as shown in this C# snippet:
var user = new User { Name = "John" };
var json = JsonConvert.SerializeObject(user);
bucket.Upsert("jsmith", json);In this example, the popular .NET JSON serializer is used to transform an ...
Read now
Unlock full access