Ask Your Question

HTTP Client Processor with JSON API response

asked 2017-12-14 03:16:56 -0500

HARSH TG gravatar image

updated 2017-12-19 12:28:18 -0500

metadaddy gravatar image

Using HTTP client as an origin to call API. JSON parser process the data passing from HTTP client. If the request body from the post returns the response as string digits("861286386"), it passes the JSON parser successfully otherwise it throws an exception at JSON Parser as Unrecognized token 'asd5asdjahsdkhashndf': was expecting ('true', 'false' or 'null') image description

Thank u.

edit retag flag offensive close merge delete


Can you give an example of what the API is actually returning in the case where you see the error? It sounds like it's not valid JSON.

metadaddy gravatar imagemetadaddy ( 2017-12-15 16:45:55 -0500 )edit

Yes, you are right. Actually, I have found the mistake what I have done. Already HTTP Client API return the response as a parsed JSON. So, I don't need to parse it **again with JSON Parser**. Directly it handles the parsed JSON and stores it in the destination as a String.

HARSH TG gravatar imageHARSH TG ( 2017-12-16 00:16:55 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-12-16 00:23:10 -0500

HARSH TG gravatar image

updated 2017-12-19 12:30:18 -0500

metadaddy gravatar image

The problem was that the input to the JSON Parser Processor was the already-parsed data. The HTTP Client Processor returns parsed JSON, so there's no need to pass it through JSON Parser. Can hand it directly to store it in the destination as a string.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-12-14 03:16:56 -0500

Seen: 765 times

Last updated: Dec 19 '17