2013-12-17 49 views
0

我使用的Restlet消耗JSON web服務,我得到這個錯誤:的Restlet拋出錯誤時,JSON開始[

A JSONObject text must begin with '{' at character 1 

我得到JSON響應始於[,這似乎導致問題。

有沒有辦法解決這個問題?

這裏是我的代碼:

ClientResource resource = new ClientResource(
    "https://api.prosper.com/api/Listings?$top=3"); 
resource.setChallengeResponse(
    ChallengeScheme.HTTP_BASIC, "username", "password"); 
Representation representation = resource.get(); 
JsonRepresentation jsonRepresentation = new JsonRepresentation(representation); 
JSONObject jsonObject = jsonRepresentation.getJsonObject(); 

回答