+sub json_convert_shim ($) {
+ my ($json) = @_;
+ # In JSON.pm 2.x, jsonToObj prints a warning to stderr which
+ # our callers don't like at all.
+ if ($JSON::VERSION >= 2.0) {
+ return from_json($json);
+ } else {
+ return jsonToObj($json);
+ }
+}
+