Seastar
High performance C++ framework for concurrent servers
|
The formatter prints json values in a json format it overload to_json method for each of the supported format all to_json parameters are passed as a pointer
#include <seastar/json/formatter.hh>
Static Public Member Functions | |
static sstring | to_json (const sstring &str) |
static sstring | to_json (int n) |
static sstring | to_json (unsigned n) |
static sstring | to_json (long n) |
static sstring | to_json (float f) |
static sstring | to_json (double d) |
static sstring | to_json (const char *str, size_t len) |
static sstring | to_json (const char *str) |
static sstring | to_json (bool d) |
template<typename... Args> | |
static sstring | to_json (const std::vector< Args... > &vec) |
template<typename... Args> | |
static sstring | to_json (const std::map< Args... > &map) |
template<typename... Args> | |
static sstring | to_json (const std::unordered_map< Args... > &map) |
static sstring | to_json (const date_time &d) |
static sstring | to_json (const jsonable &obj) |
static sstring | to_json (unsigned long l) |
static future | write (output_stream< char > &s, const sstring &str) |
static future | write (output_stream< char > &s, int n) |
static future | write (output_stream< char > &s, long n) |
static future | write (output_stream< char > &s, float f) |
static future | write (output_stream< char > &s, double d) |
static future | write (output_stream< char > &s, const char *str) |
static future | write (output_stream< char > &s, bool d) |
template<typename... Args> | |
static future | write (output_stream< char > &s, const std::vector< Args... > &vec) |
template<typename... Args> | |
static future | write (output_stream< char > &s, const std::map< Args... > &map) |
template<typename... Args> | |
static future | write (output_stream< char > &s, const std::unordered_map< Args... > &map) |
static future | write (output_stream< char > &s, const date_time &d) |
static future | write (output_stream< char > &s, const jsonable &obj) |
static future | write (output_stream< char > &s, unsigned long l) |
|
static |
return a json formatted bool
d | the bool to format |
|
static |
return a json formatted char* (treated as string), assuming there are no zero-chars in the middle
str | the char* to format |
|
static |
return a json formatted char* (treated as string), possibly with zero-chars in the middle
str | the char* to format |
len | number of bytes to read from the str |
|
static |
return a json formatted date_time
d | the date_time to format |
|
static |
return a json formatted json object
obj | the date_time to format |
|
static |
return a json formatted string
str | the string to format |
|
inlinestatic |
return a json formatted list of a given vector of params
vec | the vector to format |
|
static |
return a json formatted double
d | the double to format |
|
static |
return a json formatted float
f | the float to format |
|
static |
return a json formatted int
n | the int to format |
|
static |
return a json formatted long
n | the long to format |
|
static |
return a json formatted unsigned long
l | unsigned long to format |
|
static |
return a json formatted unsigned
n | the unsigned to format |
|
inlinestatic |
return a json formatted bool
d | the bool to format |
|
inlinestatic |
return a json formatted char* (treated as string)
str | the char* to format |
|
inlinestatic |
return a json formatted date_time
d | the date_time to format |
|
inlinestatic |
return a json formatted json object
obj | the date_time to format |
|
inlinestatic |
return a json formatted string
str | the string to format |
|
inlinestatic |
return a json formatted list of a given vector of params
vec | the vector to format |
|
inlinestatic |
return a json formatted double
d | the double to format |
|
inlinestatic |
return a json formatted float
f | the float to format |
|
inlinestatic |
return a json formatted int
n | the int to format |
|
inlinestatic |
return a json formatted long
n | the long to format |
|
inlinestatic |
return a json formatted unsigned long
l | unsigned long to format |