Made RestApi::callMethod cope with responses that aren't JSON arrays (e.g. bools).