Couchbase C++ SDK 1.4.0 (rev. 59aa900)
Loading...
Searching...
No Matches
lenient_json_transcoder< Serializer > Class Template Reference

A JSON transcoder that encodes with JSON common flags like json_transcoder, but does NOT validate the document's common flags when decoding. More...

#include <couchbase/codec/lenient_json_transcoder.hxx>

Static Public Member Functions

template<typename Document>
static auto encode (Document document) -> encoded_value
template<typename Document>
static auto decode (const encoded_value &encoded) -> Document

Detailed Description

template<typename Serializer>
class couchbase::codec::lenient_json_transcoder< Serializer >

A JSON transcoder that encodes with JSON common flags like json_transcoder, but does NOT validate the document's common flags when decoding.

It backs the no-transcoder content_as<Document>() overloads of the transactions read results (transaction_get_result and the get-multi results): per the ExtBinarySupport spec the SDK "ignores [the flags] when reading", so e.g. a document written with binary common flags but holding valid JSON can still be read. This restores the pre-ExtBinarySupport behaviour where those accessors did not reject non-JSON flags. Ordinary KV reads continue to use the strict json_transcoder.

It is an implementation detail of the transactions read path and is not meant to be named explicitly by applications.

Since
1.4.0
Internal
Internal interface

Member Function Documentation

◆ decode()

template<typename Serializer>
template<typename Document>
auto decode ( const encoded_value & encoded) -> Document
inlinestatic

◆ encode()

template<typename Serializer>
template<typename Document>
auto encode ( Document document) -> encoded_value
inlinestatic

The documentation for this class was generated from the following file: