json
json copied to clipboard
Allow value(json_pointer) to work with arrays as documented
As discovered here, value(json_pointer) throws an exception, when accessing an array. This deviates from the documented behavior:
try {
return at(ptr);
} catch(out_of_range) {
return default_value;
}
Allow value(json_pointer) to work with arrays, update documentation, and update unit tests.
Would it make sense to also have an overload for integral types just like at or operator[]?
Right, I was going to look at that as well.
Also, if needed, that is probably better suited for the planned "parity PR". I've identified a few functions with "missing" overloads. Adding it to the list.