1

I am facing a peculiar problem where, I am querying an external webservice using HTTP Rest APIs, and getting a Json response. Now the problem is when the response payload is large, a chunk of data is getting truncated in the response body. But when I do the same request using Google Rest Client, it works fine. Is there any salesforce limitation? How do I handle this situation?

Thanks in advance,

3 Answers 3

1

The parsing truncated the result due a Decimal value .0100. Json was not able to recognise this as a decimal value as it started with the decimal or dot . without a leading 0. Once we corrected this value to 0.0100, the full result was returned.

0

As mentioned above this is because of limit of heap size. One thing you can do is paginate the respose and receive limited size response against the your api call. And It will easy to answer if you show your code.

0

There is query identifier in the "nextRecordsUrl" field of response which signifies that current response is truncated due to size limit. You have to make additional request calls, may be in loop to fetch the complete result.

In simple word, have loop till the response is having "nextRecordsUrl" field and keep making additional request call till then.

Refer to this link for reference: http://www.salesforce.com/us/developer/docs/api_rest/Content/resources_query.htm

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.