SOIL C++
C++ Unified Device Interface
json_helpers.h
Go to the documentation of this file.
1#pragma once
2#include "constants.h"
3#include "cpprest/http_listener.h"
4#include "Types.h"
5
6namespace SOIL
7{
18 template <typename T>
19 DLL web::json::value to_json(const T& value);
20
31 template <typename T>
32 DLL T to_value(web::json::value json);
33
34
35 template<>
36 DLL web::json::value to_json<double>(const double& value);
37 template<>
38 DLL web::json::value to_json<int64_t>(const int64_t& value);
39 template<>
40 DLL web::json::value to_json<int>(const int& value);
41 template<>
42 DLL web::json::value to_json<std::string>(const std::string& value);
43 template<>
44 DLL web::json::value to_json<SOIL::TIME>(const SOIL::TIME& value);
45 template<>
46 DLL web::json::value to_json<SOIL::ENUM>(const SOIL::ENUM& value);
47 template<>
48 DLL web::json::value to_json<SOIL::BOOL>(const bool& value);
49 template<>
50 DLL double to_value<double>(web::json::value value);
51 template<>
52 DLL int to_value<int>(web::json::value value);
53 template<>
54 DLL int64_t to_value<int64_t>(web::json::value value);
55 template<>
56 DLL std::string to_value<std::string>(web::json::value json);
57 template<>
58 DLL SOIL::TIME to_value<SOIL::TIME>(web::json::value json);
59 template<>
60 DLL SOIL::ENUM to_value<SOIL::ENUM>(web::json::value json);
61 template<>
62 DLL bool to_value<bool>(web::json::value json);
63}
nlohmann::json json
SOIL Enum Datatype.
Definition: Enum.h:16
SOIL Time.
Definition: Time.h:13
Type definitions.
Definition: Container.h:7
DLL int to_value< int >(web::json::value value)
DLL T to_value(web::json::value json)
JSON to Value.
DLL web::json::value to_json(const T &value)
Value to JSON.
DLL web::json::value to_json< int >(const int &value)
DLL double to_value< double >(web::json::value value)
DLL web::json::value to_json< double >(const double &value)
DLL int64_t to_value< int64_t >(web::json::value value)
DLL web::json::value to_json< int64_t >(const int64_t &value)
DLL bool to_value< bool >(web::json::value json)