vinox,您应该覆盖默认文件 Request.php。将 \app\code\core\Mage\Api2\Model\Request.php 复制到本地目录,并在 getAcceptTypes() 方法结束之前添加以下代码。
unset($orderedTypes);
$orderedTypes=Array("application/json" => 1);
以其他方式,您的 getAcceptTypes() 方法应如下所示。
public function getAcceptTypes(){
$qualityToTypes = array();
$orderedTypes   = array();
foreach (preg_split('/,\s*/', $this->getHeader('Accept')) as $definition) {
    $typeWithQ = explode(';', $definition);
    $mimeType  = trim(array_shift($typeWithQ));
    // check MIME type validity
    if (!preg_match('~^([0-9a-z*+\-]+)(?:/([0-9a-z*+\-\.]+))?$~i', $mimeType)) {
        continue;
    }
    $quality = '1.0'; // default value for quality
    if ($typeWithQ) {
        $qAndValue = explode('=', $typeWithQ[0]);
        if (2 == count($qAndValue)) {
            $quality = $qAndValue[1];
        }
    }
    $qualityToTypes[$quality][$mimeType] = true;
}
krsort($qualityToTypes);
foreach ($qualityToTypes as $typeList) {
    $orderedTypes += $typeList;
}
unset($orderedTypes);
$orderedTypes=Array("application/json" => 1);
return array_keys($orderedTypes);
}