You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a YAML file that contains a map with integer keys, e.g.
8:
subMap;
1333534:
subMap:
The structure itself is meant to be generic, in my case I am refering to paramId but it can be any other MARS key.
In the code I'm now iterating with
for (const auto& key: valueMap.keys()) {
auto val = valueMap.getSubConfiguration(key);
}
which should work for consistency.
However, in this case it will return an empty map and thus distorts the workflow.
To avoid the problem, I have to put strings as keys explicitly in the map:
"8": ...
"1333434": ...
Considering that the whole eckit::Configuration is working with string keys and a valid YAML file may contain both keys (i.e. 8 and "8"), I think it is the right behaviour not to try to look up an int key.
However, it is also not failing with the expected "ConfigurationNotFound".
What are the steps to reproduce the bug?
Well...
Read a YAML file with eckit::YAMLConfiguration and iterate a map....
Version
develop
Platform (OS and architecture)
MacOS
Relevant log output
No response
Accompanying data
No response
Organisation
ECMWF
The text was updated successfully, but these errors were encountered:
What happened?
I have a YAML file that contains a map with integer keys, e.g.
The structure itself is meant to be generic, in my case I am refering to
paramId
but it can be any other MARS key.In the code I'm now iterating with
which should work for consistency.
However, in this case it will return an empty map and thus distorts the workflow.
To avoid the problem, I have to put strings as keys explicitly in the map:
Considering that the whole
eckit::Configuration
is working with string keys and a valid YAML file may contain both keys (i.e. 8 and "8"), I think it is the right behaviour not to try to look up an int key.However, it is also not failing with the expected "ConfigurationNotFound".
What are the steps to reproduce the bug?
Well...
Read a YAML file with eckit::YAMLConfiguration and iterate a map....
Version
develop
Platform (OS and architecture)
MacOS
Relevant log output
No response
Accompanying data
No response
Organisation
ECMWF
The text was updated successfully, but these errors were encountered: