29 #ifndef JSON_TRANSPORT_JSON_TRANSPORT_HPP 30 #define JSON_TRANSPORT_JSON_TRANSPORT_HPP 33 #include "json_msgs/Json.h" 44 inline json_t
unpack(json_msg_t message)
49 inline json_msg_t
pack(json_t data)
52 message.json = data.
dump();
59 namespace message_traits
107 namespace serialization
113 template<
typename Stream>
120 template<
typename Stream>
130 return json.
dump().length() + 4;
137 #endif // JSON_TRANSPORT_JSON_TRANSPORT_HPP json_t unpack(json_msg_t message)
static const char * value(const json_transport::json_t &)
json_msg_t pack(json_t data)
a class to store JSON values
json_msgs::Json json_msg_t
static const char * value()
static const char * value(const json_transport::json_t &)
static const char * value()
static const char * value()
static const char * value(const json_transport::json_t &)
static basic_json parse(detail::input_adapter i, const parser_callback_t cb=nullptr, const bool allow_exceptions=true)
deserialize from a compatible input
static uint32_t serializedLength(const json_transport::json_t &json)
static void read(Stream &stream, json_transport::json_t &json)
static void write(Stream &stream, const json_transport::json_t &json)
basic_json<> json
default JSON class
string_t dump(const int indent=-1, const char indent_char= ' ', const bool ensure_ascii=false) const
serialization