tgockel / json-voorhees

A killer modern C++ library for interacting with JSON.
http://tgockel.github.io/json-voorhees/
Apache License 2.0
128 stars 18 forks source link

Don't rely on exceptions in `value::count_path` #148

Open tgockel opened 4 years ago

tgockel commented 4 years ago

value::count_path relies on throwing std::out_of_range or kind_error to return 0 in cases where the provided path is not present or otherwise invalid. This is slower than needed. This should use the walk_path function directly instead.