Search:

Search all manuals
Search this manual
Manual
Couchbase Client Library: .NET (C#) 1.2
Community Wiki and Resources
Wiki: .NET Client Library
Download Client Library
.NET Client Library
Couchbase Developer Guide 2.0
Couchbase Server Manual 2.0
SDK Forum
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
1.3 Try it Out!
Chapter Sections
Chapters

1.3.5. Storing JSON Documents

While storing and retreiving JSON strings is a straightforward process, documents in a typical application are likely at some point to be represented by domain objects (i.e., POCOs). More mileage will come from storing some representation of these data objects. For example, the beer documents could be represented by an instance of a Beer class in memory. The .NET Client Library will allow for serializable objects to be persisted using .NET's standard over-the-wire serialization. However, on the server, these objects will be stored as binary attachments to a JSON document. The impact of being an attachment is that it will not be indexed in a view. A better solution then, is to serialize data objects to JSON strings before storing them and deserializing JSON document strings to objects when retreiving them.