fpmas 1.5
Static Public Member Functions | List of all members
fpmas::io::datapack::BasicJsonSerializer< std::string, JsonType > Struct Template Reference

#include <json_datapack.h>

Static Public Member Functions

template<typename PackType >
static std::size_t size (const PackType &pack, const std::string &item)
 
template<typename PackType >
static void to_datapack (PackType &pack, const std::string &item)
 
template<typename PackType >
static std::string from_datapack (const PackType &pack)
 

Detailed Description

template<typename JsonType>
struct fpmas::io::datapack::BasicJsonSerializer< std::string, JsonType >

std::string BasicJsonSerializer specialization.

This is implicitly used by the generic BasicJsonSerializer defined above to write dumped json strings to a BasicObjectPack.

Member Function Documentation

◆ size()

template<typename JsonType >
template<typename PackType >
static std::size_t fpmas::io::datapack::BasicJsonSerializer< std::string, JsonType >::size ( const PackType &  pack,
const std::string &  item 
)
inlinestatic

Returns the size required to serialize the json string item to pack.

◆ to_datapack()

template<typename JsonType >
template<typename PackType >
static void fpmas::io::datapack::BasicJsonSerializer< std::string, JsonType >::to_datapack ( PackType &  pack,
const std::string &  item 
)
inlinestatic

Serializes item into pack using the default Serializer<std::string> specialization.

Parameters
packdestination BasicObjectPack
itemstring to serialize

◆ from_datapack()

template<typename JsonType >
template<typename PackType >
static std::string fpmas::io::datapack::BasicJsonSerializer< std::string, JsonType >::from_datapack ( const PackType &  pack)
inlinestatic

Unserializes a json string from pack using the default SeriSerializer<std::string> specialization.

Parameters
packsource BasicObjectPack
Returns
unserialized json string

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