#include <JsonEncoder.h>
Converts zserio values to Json string representation.
Definition at line 18 of file JsonEncoder.h.
◆ encodeBool()
void zserio::JsonEncoder::encodeBool |
( |
std::ostream & |
stream, |
|
|
bool |
value |
|
) |
| |
|
static |
Encodes JSON boolean value to the given stream.
- Parameters
-
stream | Stream to use. |
value | Value to encode. |
Definition at line 15 of file JsonEncoder.cpp.
◆ encodeFloatingPoint()
void zserio::JsonEncoder::encodeFloatingPoint |
( |
std::ostream & |
stream, |
|
|
double |
value |
|
) |
| |
|
static |
Encodes JSON floating-point value to the given stream.
- Parameters
-
stream | Stream to use. |
value | Value to encode. |
Definition at line 20 of file JsonEncoder.cpp.
◆ encodeIntegral()
template<typename T >
void zserio::JsonEncoder::encodeIntegral |
( |
std::ostream & |
stream, |
|
|
T |
value |
|
) |
| |
|
static |
Encodes JSON integral value to the given stream.
- Parameters
-
stream | Stream to use. |
value | Value to encode. |
Definition at line 65 of file JsonEncoder.h.
◆ encodeNull()
void zserio::JsonEncoder::encodeNull |
( |
std::ostream & |
stream | ) |
|
|
static |
Encodes JSON null value to the given stream.
- Parameters
-
Definition at line 10 of file JsonEncoder.cpp.
◆ encodeString()
void zserio::JsonEncoder::encodeString |
( |
std::ostream & |
stream, |
|
|
StringView |
value |
|
) |
| |
|
static |
Encodes JSON string value to the given stream.
Note that this method performs escaping necessary to get a proper JSON string.
- Parameters
-
stream | Stream to use. |
value | Value to encode. |
Definition at line 50 of file JsonEncoder.cpp.
The documentation for this class was generated from the following files: