0

We were developing in a dev org and the json response is fine

Any idea to cause this error?

Expected format list of sobject

          [
                      {
                        "Name": "Planned Payment Dates 2017",
                        "Id": "00P41000007XUEEEA4"
                      },
                      {
                        "Name": "Financing proposal",
                        "Id": "00P41000007XUDpEAO"
                      }
          ]

UnExpecting format list of sobject inside an strange object

          [
          {
                        "s": 3,
                        "v": [
                          {
                            "s": 4,
                            "v": {
                              "Company_Name__c": "Test Borrower",
                              "Remaining_Time__c": "10",
                              "loan__Remaining_Investment_Amount__c": 10000.00,
                              "loan__Certificate_Rate__c": 2.000,
                              "loan__Income_Reinvested__c": 0.00,
                              "Id": "a1T4E000000Hd6YUAS"
                            }
                          }
          }
          ]
  • 1
    You should use wrapper class list if you're returning list of sObject. Those properties looks weird, maybe if we can see some code it would be easier for us to recommend something. – Raul Mar 22 '17 at 6:52
  • Also your json is not formatted properly. – Rohit Mourya Mar 22 '17 at 6:59
0

May be you are not getting proper json formatted data. It should be something like this.

   [
      {
                    "s": 3,
                    "v": [
                      {
                        "s": 4,
                        "v": {
                          "Company_Name__c": "Test Borrower",
                          "Remaining_Time__c": "10",
                          "loan__Remaining_Investment_Amount__c": 10000.00,
                          "loan__Certificate_Rate__c": 2.000,
                          "loan__Income_Reinvested__c": 0.00,
                          "Id": "a1T4E000000Hd6YUAS"
                        }
                      }
                   ]
      }
      ]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.