Zserio C++ runtime library  1.0.2
Built for Zserio 2.14.1
DebugStringUtil.h File Reference
#include <fstream>
#include <sstream>
#include <utility>
#include "zserio/JsonReader.h"
#include "zserio/JsonWriter.h"
#include "zserio/ReflectableUtil.h"
#include "zserio/Traits.h"
#include "zserio/Walker.h"

Go to the source code of this file.

Namespaces

 zserio
 

Functions

template<typename T , typename ALLOC = typename T::allocator_type, typename std::enable_if< is_allocator< ALLOC >::value, int >::type = 0>
void zserio::toJsonStream (const T &object, std::ostream &stream, const ALLOC &allocator=ALLOC())
 
template<typename T , typename ALLOC = typename T::allocator_type, typename std::enable_if< is_allocator< ALLOC >::value, int >::type = 0>
void zserio::toJsonStream (const T &object, std::ostream &stream, uint8_t indent, const ALLOC &allocator=ALLOC())
 
template<typename T , typename WALK_FILTER , typename ALLOC = typename T::allocator_type, typename std::enable_if< std::is_base_of< IBasicWalkFilter< ALLOC >, typename std::decay< WALK_FILTER >::type >::value, int >::type = 0>
void zserio::toJsonStream (const T &object, std::ostream &stream, WALK_FILTER &&walkFilter, const ALLOC &allocator=ALLOC())
 
template<typename T , typename WALK_FILTER , typename ALLOC = typename T::allocator_type, typename std::enable_if< std::is_base_of< IBasicWalkFilter< ALLOC >, typename std::decay< WALK_FILTER >::type >::value, int >::type = 0>
void zserio::toJsonStream (const T &object, std::ostream &stream, uint8_t indent, WALK_FILTER &&walkFilter, const ALLOC &allocator=ALLOC())
 
template<typename T , typename ALLOC = typename T::allocator_type, typename std::enable_if< is_allocator< ALLOC >::value, int >::type = 0>
string< ALLOC > zserio::toJsonString (const T &object, const ALLOC &allocator=ALLOC())
 
template<typename T , typename ALLOC = typename T::allocator_type, typename std::enable_if< is_allocator< ALLOC >::value, int >::type = 0>
string< ALLOC > zserio::toJsonString (const T &object, uint8_t indent, const ALLOC &allocator=ALLOC())
 
template<typename T , typename WALK_FILTER , typename ALLOC = typename T::allocator_type, typename std::enable_if< std::is_base_of< IBasicWalkFilter< ALLOC >, typename std::decay< WALK_FILTER >::type >::value, int >::type = 0>
string< ALLOC > zserio::toJsonString (const T &object, WALK_FILTER &&walkFilter, const ALLOC &allocator=ALLOC())
 
template<typename T , typename WALK_FILTER , typename ALLOC = typename T::allocator_type, typename std::enable_if< std::is_base_of< IBasicWalkFilter< ALLOC >, typename std::decay< WALK_FILTER >::type >::value, int >::type = 0>
string< ALLOC > zserio::toJsonString (const T &object, uint8_t indent, WALK_FILTER &&walkFilter, const ALLOC &allocator=ALLOC())
 
template<typename T , typename ALLOC = typename T::allocator_type, typename std::enable_if< is_allocator< ALLOC >::value, int >::type = 0>
void zserio::toJsonFile (const T &object, const string< ALLOC > &fileName, const ALLOC &allocator=ALLOC())
 
template<typename T , typename ALLOC = typename T::allocator_type, typename std::enable_if< is_allocator< ALLOC >::value, int >::type = 0>
void zserio::toJsonFile (const T &object, const string< ALLOC > &fileName, uint8_t indent, const ALLOC &allocator=ALLOC())
 
template<typename T , typename WALK_FILTER , typename ALLOC = typename T::allocator_type, typename std::enable_if< std::is_base_of< IBasicWalkFilter< ALLOC >, typename std::decay< WALK_FILTER >::type >::value, int >::type = 0>
void zserio::toJsonFile (const T &object, const string< ALLOC > &fileName, WALK_FILTER &&walkFilter, const ALLOC &allocator=ALLOC())
 
template<typename T , typename WALK_FILTER , typename ALLOC = typename T::allocator_type, typename std::enable_if< std::is_base_of< IBasicWalkFilter< ALLOC >, typename std::decay< WALK_FILTER >::type >::value, int >::type = 0>
void zserio::toJsonFile (const T &object, const string< ALLOC > &fileName, uint8_t indent, WALK_FILTER &&walkFilter, const ALLOC &allocator=ALLOC())
 
template<typename ALLOC = std::allocator<uint8_t>>
detail::DebugStringTraits< ALLOC >::ReflectablePtr zserio::fromJsonStream (const IBasicTypeInfo< ALLOC > &typeInfo, std::istream &is, const ALLOC &allocator=ALLOC())
 
template<typename T , typename ALLOC = typename T::allocator_type>
zserio::fromJsonStream (std::istream &is, const ALLOC &allocator=ALLOC())
 
template<typename ALLOC = std::allocator<uint8_t>>
detail::DebugStringTraits< ALLOC >::ReflectablePtr zserio::fromJsonString (const IBasicTypeInfo< ALLOC > &typeInfo, const string< ALLOC > &json, const ALLOC &allocator=ALLOC())
 
template<typename T , typename ALLOC = typename T::allocator_type>
zserio::fromJsonString (const string< ALLOC > &json, const ALLOC &allocator=ALLOC())
 
template<typename ALLOC = std::allocator<uint8_t>>
detail::DebugStringTraits< ALLOC >::ReflectablePtr zserio::fromJsonFile (const IBasicTypeInfo< ALLOC > &typeInfo, const string< ALLOC > &fileName, const ALLOC &allocator=ALLOC())
 
template<typename T , typename ALLOC = typename T::allocator_type>
zserio::fromJsonFile (const string< ALLOC > &fileName, const ALLOC &allocator=ALLOC())
 

Detailed Description

It provides utilities for JSON debug string which can be obtained from zserio objects.

These utilities are not used by generated code and they are provided only for user convenience.

Note
Please note that Zserio objects must be generated with -withTypeInfoCode and -withReflectionCode zserio options to enable JSON debug string!
Please note that file operations allocate memory as needed and are not designed to use allocators.

Definition in file DebugStringUtil.h.