Skip to content

Commit

Permalink
Fix JSON serialized of empty data (#1218)
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseclectic committed Apr 14, 2021
1 parent be4a6fa commit e0db53f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/framework/results/data/data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Data &Data::combine(Data &&other) {
}

json_t Data::to_json() {
json_t result;
json_t result = json_t::object();
DataRValue::add_to_json(result);
DataRVector::add_to_json(result);
DataRDict::add_to_json(result);
Expand Down
2 changes: 1 addition & 1 deletion src/framework/results/data/metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Metadata &Metadata::combine(Metadata &&other) {
}

json_t Metadata::to_json() {
json_t result;
json_t result = json_t::object();
DataMap<SingleData, json_t, 1>::add_to_json(result);
DataMap<SingleData, json_t, 2>::add_to_json(result);
DataMap<SingleData, json_t, 3>::add_to_json(result);
Expand Down

0 comments on commit e0db53f

Please sign in to comment.