After a callout, I am getting a JSON response as:
{
"totalSize": 1,
"done": true,
"records": [
{
"attributes": {
"type": "Document__c",
"url": "/services/data/v35.0/sobjects/Document__c/a0A02000000jFwOEAU"
},
"Id": "a0A02000000jFwOEAU",
"Name": "js.pdf",
"CreatedDate": "2022-06-21T12:13:20.000+0000",
"Type__c": "General",
"Fund__r": {
"attributes": {
"type": "Fund__c",
"url": "/services/data/v35.0/sobjects/Fund__c/a0E02000000SzzuEAC"
},
"Name": "Fund 0"
},
"Investment_Vehicle_Name__c": null,
"Document_Date__c": "2022-06-21",
"Document_Date_String__c": "6/21/2022",
"Portal_Document__c": true,
"Attachments": {
"totalSize": 1,
"done": true,
"records": [
{
"attributes": {
"type": "Attachment",
"url": "/services/data/v35.0/sobjects/Attachment/00P0200000CoRXHEA3"
},
"Id": "00P0200000CoRXHEA3",
"Name": "js.pdf",
"ContentType": "application/pdf",
"BodyLength": 109244
}
]
}
}
]
}
When I try deserializing the above response using:
List<Document__c> documentForLP = (List<Document__c>) JSON.deserialize(res.getBody(),Document__c.class);
I am getting the error:
10:33:33:353 USER_DEBUG [1085]|DEBUG|Error: No field name specified on column for sobject of type Document__c
I am sure that Document__c object is available in the org. But not able to comprehend what the exact error message is trying to convey.