Template Function jwt::to_json_str

Function Documentation

template<typename T, typename Cond>
std::string jwt::to_json_str(const T &obj, bool pretty)

Converts an object of type T

to its JSON string format.

For pretty print, pass second parameter as

true.

Note

: Type T must have a member function named create_json_obj. The check is made at compile time. Check meta::has_create_json_obj_member for more details. This check is done in Cond template parameter.