2013-08-23 55 views
0

您好我想提出一個調用的API和它返回API調用返回額外的不必要的HTML頭信息

[{"ActorID":1,"ActorName":"dfdsf","ActorOccupation":0,"ActorLevel":3,"VsRank":10,"PVP_Vs":0,"FightTotalCount":"0","WinCount":"0"}, 
{"ActorID":2,"ActorName":"sdsf","ActorOccupation":0,"ActorLevel":0,"VsRank":10,"PVP_Vs":0,"FightTotalCount":"0","WinCount":"0"}] 


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html 
     xmlns="http://www.w3.org/1999/xhtml"> 
     <head> 
      <title></title> 
     </head> 
     <body> 
      <form method="post" action="GetRankingList.aspx?pvptype=1&amp;sid=1&amp;tm=20130821160000&amp;auth=77c9b582c3aed3d3974400cfb118fe4b" id="form1"> 
       <div class="aspNetHidden"> 
        <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2MTY2ODcyMjlkZLSAAAtd4/lj1u6b0GjPWM+p3i9tqI6sq+xDrRw2cAv3" /> 
       </div> 
       <div></div> 
      </form> 
     </body> 
    </html> 

所有我想要的是一個簡單的JSON數組對象。我沒有寫這個API,但是有沒有人知道我可以怎麼指定我想要的對象本身。我已經指定了

format : "json" 

作爲參數,當我打這個電話。無論我如何進行調用(Ajax,瀏覽器等),該值都會返回。

+0

如果低於實際JSON的輸出是固定的,則可以簡單地將其切斷 –

+0

請API的編寫者修復它們的問題。 –

回答