Open apolukhin opened 1 year ago
@apolukhin, I've took a look at the issue and it turns out that userver/formats/yaml/ iterators are simply wrappers for iterators from the yaml-cpp library and the yaml-cpp iterators don't support reverse semantic now.
Probably, a good solution would be to implement reverse iterators in the yaml-cpp at first. Am I right or you supposed a different approach here?
You are right. It seems that the fix should be done in yaml-cpp first
The reverse iterators for arrays in
formats::yaml::Value
would be handy https://github.com/userver-framework/userver/blob/develop/shared/include/userver/formats/yaml/value.hppNote that key in YAML are unordered, so there's no sence in making reverse iterators for keys.
For an example see reverse iterators in
formats::json::Value
https://github.com/userver-framework/userver/blob/develop/shared/include/userver/formats/json/value.hpp