Skip to content

Commit 1ecca57

Browse files
authored
Merge pull request #7 from cpp-pre/revert-6-feature/move-to-native-tipi-deps
Revert "Fix empty maps roundtrip and move to native tipi deps"
2 parents d3022d4 + f95a02b commit 1ecca57

File tree

5 files changed

+3
-29
lines changed

5 files changed

+3
-29
lines changed

.tipi/deps

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
{
2-
"nlohmann/json" : { "@" : "v3.11.2", "x" : ["benchmarks"] }
3-
, "tipi-deps/boost" : {
4-
"@" : "v1.80.0-without-submodules"
5-
, "u" : true
6-
, "packages" : ["boost_fusion"]
7-
, "targets" : ["Boost::fusion"]
8-
}
1+
{
2+
"nlohmann/json" : { "@" : "v3.11.1", "x" : ["benchmarks"] }
3+
, "platform" : [ "Boost::+boost" ]
94
}

.tipi/id

-1
This file was deleted.

.tipi/opts

-1
This file was deleted.

pre/json/detail/jsonizer.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ namespace pre { namespace json { namespace detail {
111111
template<class T,
112112
enable_if_is_associative_container_t<T>* = nullptr>
113113
void operator()(const T& value) const {
114-
_json_object = nlohmann::json::object();
115114
for (const auto& each : value) {
116115
nlohmann::json json_subobject;
117116
jsonizer subjsonizer(json_subobject);

test/dejsonize_test.cpp

-18
Original file line numberDiff line numberDiff line change
@@ -400,24 +400,6 @@ BOOST_AUTO_TEST_CASE(maps) {
400400
BOOST_REQUIRE(some_deserialized == some);
401401
}
402402

403-
BOOST_AUTO_TEST_CASE(empty_map) {
404-
405-
std::map<std::string, std::string> some{};
406-
407-
auto some_json = pre::json::to_json(some);
408-
std::cout << some_json.dump(2) << std::endl;
409-
410-
auto some_deserialized = pre::json::from_json<decltype(some)>(some_json);
411-
412-
BOOST_REQUIRE(some_deserialized == some);
413-
414-
auto empty_map = pre::json::to_json( std::map<std::string, std::string> {} ).dump();
415-
BOOST_REQUIRE(empty_map != "null");
416-
BOOST_REQUIRE(empty_map == "{}");
417-
}
418-
419-
420-
421403

422404
namespace datamodel {
423405

0 commit comments

Comments
 (0)