json 객체에 요청하면 다음 문자열이 표시됩니다. json 객체에 날짜가 포함 된 문자열
{
"singular": "Financial Report",
"plural": "Financial Reports",
"statusId": "A",
"records": [
{
"id": 131114,
"companyId": 645588,
"userId": 5520,
"title": "Annual Report",
"typeId": "AR",
"statusId": "A",
"periodDate": new Date(1409457600000),
"isImmediate": true,
"createdDate": new Date(1419276796000),
"lastModifiedDate": new Date(1419276796000),
"releaseDate": new Date(1419276796000),
"releaseDateTimeFormatted": "Dec 22, 2014 02:33 PM",
"releaseDateFormatted": "Dec 22, 2014",
"canDistribute": true,
"wasDistributed": false,
"companyName": "Sunridge Gold Corp.",
"typeName": "Annual Report",
"name": "Annual Report - Annual Report",
"statusDescript": "Active",
"userName": "Doris Meyer",
"symbol": "SGCNF",
"primarySymbol": "SGCNF",
"primaryExchange": "OTC Link",
"isCaveatEmptor": false,
"edgarSECFiling": false
}
],
"sortOn": "releaseDate",
"sortDir": "DESC",
"totalRecords": 76165,
"pages": 3047,
"currentPage": 4,
"pageSize": 25
}
나는 그것이
위의 JSON 문자열에서 새로운 일을 피할 수있는 방법이 있나요 com.google.gson.stream.MalformedJsonException
을 던지는 구글 GSON 라이브러리를 사용하여 분석을 시도했다.
비슷한 질문이지만 자바 스크립트 http://stackoverflow.com/questions/20195685/date-embedded-in-json-string/27654865#27654865 –
코드를 표시하십시오. – Ilya
Gson gson = new Gson(); MyObject myObj = gson.fromJson (jsonString, MyObject.class); 위의 json 문자열이 유효한 json인지, 아니면 http://jsonlint.com/을 사용하지 않는지 확인해 보았습니다. 유효하지 않은 json으로 오류가 발생했습니다. –