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();