CppWAMP
C++11 client library for the WAMP protocol
|
Go to the documentation of this file.
7 #ifndef CPPWAMP_JSON_HPP
8 #define CPPWAMP_JSON_HPP
38 template <
typename O,
typename C = OutputCategoryTypeOf<O>>
43 using OutputCategory = C;
57 std::unique_ptr<Impl> impl_;
81 template <
typename I,
typename C = InputCategoryTypeOf<I>>
86 using InputCategory = C;
95 CPPWAMP_NODISCARD std::error_code
decode(
const Input& input,
100 std::unique_ptr<Impl> impl_;
113 template <
typename I>
127 CPPWAMP_NODISCARD std::error_code
decode(Input& input,
Variant& variant);
150 template <
typename TOutput,
154 template <
typename TInput,
159 static constexpr
int id() {
return KnownCodecIds::json();}
164 #ifndef CPPWAMP_COMPILED_LIB
165 #include "internal/json.ipp"
168 #endif // CPPWAMP_JSON_HPP
static constexpr int id()
Obtains a numeric identifier associated with this codec.
Definition: json.hpp:159
Discriminated union container that represents a JSON value.
Definition: variant.hpp:134
JSON format tag type.
Definition: json.hpp:148
Defines macros related to exporting/importing APIs.
JSON decoder.
Definition: json.hpp:82
void encode(const Variant &variant, TOutput &&output)
Encodes the given variant to the given byte container or stream.
Definition: codec.hpp:103
Definition: anyhandler.hpp:36
typename OutputCategory< ValueTypeOf< O > >::type OutputCategoryTypeOf
Yields the category type that best matches the given output type.
Definition: codec.hpp:79
JSON encoder.
Definition: json.hpp:39
typename InputCategory< ValueTypeOf< I > >::type InputCategoryTypeOf
Yields the category type that best matches the given input type.
Definition: codec.hpp:148
Contains the declaration of Variant and other closely related types/functions.
std::error_code decode(TInput &&input, Variant &variant)
Decodes from the given byte sequence or stream to the given variant.
Definition: codec.hpp:172
Contains essential definitions for wamp::Variant codecs.