Expand my Community achievements bar.

Nomination window for the Adobe Community Advisor Program, Class of 2025, is now open!
SOLVED

getting JSON Exception while reading file in custom transport handler

Avatar

Level 2

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

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi Sharath,

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

Thanks,

View solution in original post

2 Replies

Avatar

Level 10

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

Avatar

Correct answer by
Level 9

Hi Sharath,

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

Thanks,