Skip to content

Commit

Permalink
Enums are case insensitive when reading the runtime configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
JoukoVirtanen committed Jan 2, 2025
1 parent ec1d496 commit f1c0f05
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions collector/lib/ConfigLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ bool ConfigLoader::LoadConfiguration(CollectorConfig& config, const YAML::Node&
sensor::CollectorConfig runtimeConfig;
google::protobuf::util::JsonParseOptions parseOptions;
parseOptions.ignore_unknown_fields = true;
parseOptions.case_insensitive_enum_parsing = true;
auto status = google::protobuf::util::JsonStringToMessage(jsonStr, &runtimeConfig, parseOptions);
if (!status.ok()) {
CLOG(ERROR) << "Failed to parse config: " << status.ToString();
Expand Down

0 comments on commit f1c0f05

Please sign in to comment.