Add phutil_json_decode(), for convenience
Summary:
This is just a convenience method for decoding possibly-sketchy strings. We have a lot of cases where we may try to decode some uninitialized value (like null) and then check if we got something sensible out or not.
Particularly, almost all of these can likely be simplified:
$ git grep -A1 -i 'json_decode' . | grep is_array | wc -l 33
Test Plan: Added and executed unit tests.
Reviewers: btrahan
Reviewed By: btrahan
CC: aran
Differential Revision: https://secure.phabricator.com/D8363