All documents stored in Couchbase Server will return a JSON
structure, however, only submitted information that could be
parsed into a JSON document will be stored as a JSON document.
If you store a value that cannot be parsed as a JSON document,
the original binary data is stored. This can be identified
during view processing by using the meta
object supplied to the map() function.
Information that has been identified and stored as binary documents instead of JSON documents can still be indexed through the views system by creating an index on the key data. This can be particularly useful when the document key is significant. For example, if you store information using a prefix to the key to identify the record type, you can create document-type specific indexes.
For more information and examples, see Section 9.5.3, “Views on non-JSON Data”.