Skip to main content
Level 2
Apr 24, 2017 10:04 AM UTC
Solved

getting JSON Exception while reading file in custom transport handler

getting JSON Exception while reading file in custom transport handler

 InputStream is = replicationTransaction.getContent().getInputStream();

jsonTxt = IOUtils.toString( is );

JSONObject pageContent = new JSONObject(jsonTxt);

 

THE SAME IS working if i try to print the file content in content builder

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
MC_Stuff
MC_StuffAccepted solution
Level 10
Apr 25, 2017 7:30 AM UTC

Hi Sharath,

It might not be json format Or missing the content type. Pring jsonTxt and Validate the  response at  https://jsonformatter.org/

Thanks,

2 replies

smacdonald2008
Level 10
Apr 24, 2017 6:36 PM UTC

Are you following an online artilce so ppl can try and follow what you are doing. 

Translate
MC_Stuff
MC_StuffAccepted solution
Level 10
Apr 25, 2017 7:30 AM UTC

Hi Sharath,

It might not be json format Or missing the content type. Pring jsonTxt and Validate the  response at  https://jsonformatter.org/

Thanks,

Translate