lib-cpp-pre 1.4.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
pre
json
to_json.hpp
1
#ifndef PRE_JSON_TO_JSON_HPP
2
#define PRE_JSON_TO_JSON_HPP
3
4
#include <pre/json/detail/jsonizer.hpp>
5
6
namespace
pre
{
namespace
json {
7
64
template
<
class
T>
65
nlohmann::json
to_json
(
const
T& value) {
66
nlohmann::json json_object;
67
detail::jsonizer jsonizer(json_object);
68
jsonizer(value);
69
return
json_object;
70
}
71
72
}}
73
74
#endif
pre::json::to_json
nlohmann::json to_json(const T &value)
Serialize to a JSON object any C++ object of any type, even your own types.
Definition:
to_json.hpp:65
pre
Generated on Thu Nov 24 2016 10:54:24 for lib-cpp-pre by
1.8.11