We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 666fcd3 + 7fc406a commit cfc3e7aCopy full SHA for cfc3e7a
2 files changed
include/vix/json/json.hpp
@@ -127,7 +127,12 @@ namespace vix::json
127
* Json j = R"({"a": 1, "b": 2})"_json;
128
* @endcode
129
*/
130
- namespace literals = nlohmann::literals;
+#if defined(NLOHMANN_JSON_VERSION_MAJOR)
131
+#if (NLOHMANN_JSON_VERSION_MAJOR > 3) || \
132
+ (NLOHMANN_JSON_VERSION_MAJOR == 3 && NLOHMANN_JSON_VERSION_MINOR >= 10)
133
+ namespace literals = nlohmann::literals::json_literals;
134
+#endif
135
136
137
} // namespace vix::json
138
include/vix/json/loads.hpp
@@ -145,7 +145,8 @@ namespace vix::json
145
{
146
try
147
148
- return Json::parse(s);
+ Json j = Json::parse(s);
149
+ return j;
150
}
151
catch (...)
152
0 commit comments