Merge pull request #2792 from CyrusBiotechnology/smlewis/commons/json_utils_sqtest_2
nlohmann::json extraction utilities
From Steven Lewis:
This is a set of functions with type-checking and bounds-checking for getting values out of nlohmann::json (the one added to the external libs). This gives us Rosetta-style error behavior in error cases instead of either nlohmann-style or uninterpretable-style. This addresses #2763 for Commons, and lets me reduce a lot of boilerplate on the Cyrus side. (Replying to @asford 's comment in #2763 : json-schema is absolutely a good way to address this, but it doesn't work for initial writing/debugging stages of the code - plus we're already using it, and I want a second layer of checking for a comfy security blanket!)
I chose to make all the functions have the same signature - return by reference - for consistency. It's inconvenient for bool/Real.
This PR will also give us a "real test" for @lyskov 's tweaks to see if we can test cross-fork merges properly.