38 static inline const char escape_character =
'\\';
39 static inline const std::string characters_to_escape =
"\\\"\r\n\t\f\b";
57 static_assert(std::is_standard_layout<T>::value && std::is_trivial<T>::value,
58 "A specialization of cbeam::json::traits must be implemented for types that are not both standard-layout and trivial.");
72 stream.
append(str.c_str(), str.length());
Manages memory a byte buffer, offering dynamic appending. This class is designed for scenarios where ...
Definition buffer.hpp:50
virtual void append(const void *buffer_to_append, const std::size_t length_of_buffer)
append the given buffer to the end of the current buffer. If there is no current buffer yet,...
Definition buffer.hpp:96
std::string to_string(const container::buffer &b)
Creates a std::string from the contents of a container::buffer.
Definition buffer.hpp:42
std::string escape_string(const std::string &input, const char escape_character, const std::string &characters_to_escape)
Definition string.hpp:97
Provides JSON-style and nested-map serialization features. It offers methods to convert a wide range ...
Definition map.hpp:37
void * serialized_object
Represents a serialized value in memory.
Definition traits.hpp:46
Defines the traits required for serializing and deserializing objects of type T.
Definition traits.hpp:56
static void serialize(const T &val, container::buffer &stream)
Required to serialize an object of type T into a shared_buffer stream.
Definition traits.hpp:67