only try to convert from json if the api function has a return type.