Skip to content

Commit

Permalink
do not omit primitive fields with default values
Browse files Browse the repository at this point in the history
  • Loading branch information
rex-schilasky committed Aug 8, 2024
1 parent 0f51c70 commit 304b5f9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ecal/core/src/monitoring/ecal_monitoring_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,12 @@ namespace eCAL
GetMonitoringPb(monitoring_pb, entities_);

google::protobuf::util::JsonPrintOptions options;
options.add_whitespace = true; // enables pretty printing with whitespace
options.add_whitespace = true; // enables pretty printing with whitespace
#if GOOGLE_PROTOBUF_VERSION >= 5026000
options.always_print_fields_with_no_presence = true; // do not omit primitive fields with default values
#else
options.always_print_primitive_fields = true; // do not omit primitive fields with default values
#endif
google::protobuf::util::MessageToJsonString(monitoring_pb, &monitoring_, options);
}

Expand Down

0 comments on commit 304b5f9

Please sign in to comment.