Forum Discussion
JSON File: reached end of buffer
- 5 years ago
Well I have been able to locate the problem:
The POST call returns an incomplete response thus incomplete JSON file is saved.
It seems to be an issue with my data provider.
So moral of the story is: incorrect JSON format will give an end of buffer memory error.
Thank your for your time.
Well I have been able to locate the problem:
The POST call returns an incomplete response thus incomplete JSON file is saved.
It seems to be an issue with my data provider.
So moral of the story is: incorrect JSON format will give an end of buffer memory error.
Thank your for your time.
Hi Sibrulotte
For what it's worth, is the reponse incomplete because the request was invalid or was the request valid but the returned data was badly formatted or truncated JSON?
If a request is invalid and the expected returned data should be JSON, then what happens is you actually get a HTTP response back (which isn't JSON) and any attempt to parse JSON fails.
It's always best to check what response is actually received rather than assume you get what you asked for.
I know you said that your first request worked, so it would look like your request is properly formed. However you can still get an error returned if there's a problem with the service you are connecing to (perhaps a 404 Not Found or a 500 Internal Server Error).
Anyway, just thought that might be useful to bear in mind for the future.
regards
Phil
- Sibrulotte5 years agoHelper IV
Thanks Phil, the response starts off well, but is just truncated and doesn't end with a JSON synthax closure.
So I need to fix that POST call before I do anything else. 🙂