Fix up responses from inventory resource methods so that they always produce JSON.