Goby3  3.1.5a
2024.05.23
goby::middleware::SerializerParserHelper< T, MarshallingScheme::JSON > Struct Template Reference

Support arbitrary data types using nlohmann JSON (must define to_json/from_json functions for your data type: see nlohmann JSON docs) More...

#include <goby/middleware/marshalling/json.h>

Static Public Member Functions

static std::vector< charserialize (const T &msg)
 
static std::string type_name (const T &t=T())
 
template<typename CharIterator >
static std::shared_ptr< T > parse (CharIterator bytes_begin, CharIterator bytes_end, CharIterator &actual_end, const std::string &type=type_name())
 

Detailed Description

template<typename T>
struct goby::middleware::SerializerParserHelper< T, MarshallingScheme::JSON >

Support arbitrary data types using nlohmann JSON (must define to_json/from_json functions for your data type: see nlohmann JSON docs)

Definition at line 68 of file json.h.

Member Function Documentation

◆ parse()

template<typename T >
template<typename CharIterator >
static std::shared_ptr<T> goby::middleware::SerializerParserHelper< T, MarshallingScheme::JSON >::parse ( CharIterator  bytes_begin,
CharIterator  bytes_end,
CharIterator &  actual_end,
const std::string &  type = type_name() 
)
inlinestatic

Definition at line 79 of file json.h.

◆ serialize()

template<typename T >
static std::vector<char> goby::middleware::SerializerParserHelper< T, MarshallingScheme::JSON >::serialize ( const T &  msg)
inlinestatic

Definition at line 70 of file json.h.

◆ type_name()

template<typename T >
static std::string goby::middleware::SerializerParserHelper< T, MarshallingScheme::JSON >::type_name ( const T &  t = T())
inlinestatic

Definition at line 76 of file json.h.


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