意外的输入结束:ARRAY的预期关闭标记 - Android

时间:2016-11-23 04:56:43

标签: android

当我尝试从服务器获取数据时,我的Android应用程序出错了。这不会一直发生。有一段时间我得到了正确的结果。它采用正确的JSON格式。请帮我解决这个问题。

这是请求

@Rest(rootUrl = ApiBase, converters = {MappingJacksonHttpMessageConverter.class}, interceptors = {LogInterceptor.class}, requestFactory = HttpComponentsClientHttpRequestFactory.class)
    
public interface ServerApi {

@Get("/getDetails?token={token}&isFavorite={favorite}&limit=25&offset=11&lat={lat}&long={lon}&distance={distance}&category={category}&isEndingSoon=0&isFlagship={flagship}&sort_by=in_mi&direction=ASC&storeId={store}&search={search}")

DetailsResult getDetails(@Path String token, @Path int favorite, @Path double lat, @Path double lon, @Path int distance, @Path String search, @Path int category, @Path int flagship, @Path Integer store) throws RestClientException;

}

响应是:

E/API: ERROR: Could not read JSON: Unexpected end-of-input: expected close marker for ARRAY (from [Source: org.apache.http.conn.EofSensorInputStream@7259675; line: 10950, column: 32])
           at [Source: org.apache.http.conn.EofSensorInputStream@7259675; line: 10953, column: 503]; nested exception is org.codehaus.jackson.JsonParseException: Unexpected end-of-input: expected close marker for ARRAY (from [Source: org.apache.http.conn.EofSensorInputStream@7259675; line: 10950, column: 32])
        at [Source: org.apache.http.conn.EofSensorInputStream@7259675; line: 10953, column: 503]

0 个答案:

没有答案