Skip to content

Commit 808b265

Browse files
committed
testing
1 parent 288c4b6 commit 808b265

33 files changed

+18851
-2
lines changed
1.52 KB
Binary file not shown.

json-downloader/json-downloader/json-downloader.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@
7575
</PropertyGroup>
7676
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
7777
<LinkIncremental>true</LinkIncremental>
78-
<IncludePath>..\..\libcurl-vc14-AMD64-release-static-ipv6-sspi-winssl\include;$(IncludePath)</IncludePath>
78+
<IncludePath>..\..\json\include;..\..\libcurl-vc14-AMD64-release-static-ipv6-sspi-winssl\include;$(IncludePath)</IncludePath>
7979
</PropertyGroup>
8080
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
8181
<LinkIncremental>false</LinkIncremental>
8282
</PropertyGroup>
8383
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
8484
<LinkIncremental>false</LinkIncremental>
85-
<IncludePath>..\..\libcurl-vc14-AMD64-release-static-ipv6-sspi-winssl\include;$(IncludePath)</IncludePath>
85+
<IncludePath>..\..\json\include;..\..\libcurl-vc14-AMD64-release-static-ipv6-sspi-winssl\include;$(IncludePath)</IncludePath>
8686
</PropertyGroup>
8787
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
8888
<ClCompile>
192 Bytes
Binary file not shown.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#pragma once
2+
3+
#include <utility>
4+
5+
#include <nlohmann/detail/conversions/from_json.hpp>
6+
#include <nlohmann/detail/conversions/to_json.hpp>
7+
8+
namespace nlohmann
9+
{
10+
template<typename, typename>
11+
struct adl_serializer
12+
{
13+
/*!
14+
@brief convert a JSON value to any value type
15+
16+
This function is usually called by the `get()` function of the
17+
@ref basic_json class (either explicit or via conversion operators).
18+
19+
@param[in] j JSON value to read from
20+
@param[in,out] val value to write to
21+
*/
22+
template<typename BasicJsonType, typename ValueType>
23+
static auto from_json(BasicJsonType&& j, ValueType& val) noexcept(
24+
noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), val))) -> decltype(
25+
::nlohmann::from_json(std::forward<BasicJsonType>(j), val), void()
26+
)
27+
{
28+
::nlohmann::from_json(std::forward<BasicJsonType>(j), val);
29+
}
30+
31+
/*!
32+
@brief convert any value type to a JSON value
33+
34+
This function is usually called by the constructors of the @ref basic_json
35+
class.
36+
37+
@param[in,out] j JSON value to write to
38+
@param[in] val value to read from
39+
*/
40+
template <typename BasicJsonType, typename ValueType>
41+
static auto to_json(BasicJsonType& j, ValueType&& val) noexcept(
42+
noexcept(::nlohmann::to_json(j, std::forward<ValueType>(val))))
43+
-> decltype(::nlohmann::to_json(j, std::forward<ValueType>(val)),
44+
void())
45+
{
46+
::nlohmann::to_json(j, std::forward<ValueType>(val));
47+
}
48+
};
49+
}

0 commit comments

Comments
 (0)