Zserio C++ runtime library  1.2.0
Built for Zserio 2.16.0
zserio::BasicJsonReader< ALLOC > Class Template Reference

#include <JsonReader.h>

Public Member Functions

 BasicJsonReader (std::istream &in, const ALLOC &allocator=ALLOC())
 
IBasicReflectablePtr< ALLOC > read (const IBasicTypeInfo< ALLOC > &typeInfo)
 

Detailed Description

template<typename ALLOC = std::allocator<uint8_t>>
class zserio::BasicJsonReader< ALLOC >

Reads zserio object tree defined by a type info from a text stream.

Definition at line 185 of file JsonReader.h.

Constructor & Destructor Documentation

◆ BasicJsonReader()

template<typename ALLOC = std::allocator<uint8_t>>
zserio::BasicJsonReader< ALLOC >::BasicJsonReader ( std::istream &  in,
const ALLOC &  allocator = ALLOC() 
)
inlineexplicit

Constructor.

Parameters
inText stream to read.
allocatorAllocator to use.

Definition at line 194 of file JsonReader.h.

Member Function Documentation

◆ read()

template<typename ALLOC = std::allocator<uint8_t>>
IBasicReflectablePtr<ALLOC> zserio::BasicJsonReader< ALLOC >::read ( const IBasicTypeInfo< ALLOC > &  typeInfo)
inline

Reads a zserio object tree defined by the given type info from the text stream.

Parameters
typeInfoType info defining the expected zserio object tree.
Returns
Zserio object tree initialized using the JSON data.
Exceptions
CppRuntimeExceptionWhen the JSON doesn't contain expected zserio object tree.

Definition at line 207 of file JsonReader.h.


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