「view this page in B3 βῆτα server」

Revisions №59936

branch: master 「№59936」
Commited by: Andrew Leaver-Fay
GitHub commit link: 「78aa0aa3befb16a0」 「№2792」
Difference from previous tested commit:  code diff
Commit date: 2017-12-21 12:50:44

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.

...