java - Convert StringBuffer into Json Object -


I have to create a web service on which an Ajax request has been called, an array of Jason from the third party Application should be obtained using Java.net classes. Now I am able to get data from third party and can store it in a string buffer, but I have to return this data to the page as JSN object from which the AJAX call was made. Can someone help me understand how to convert a stringbuff into a JSON object? To make the problem easier to understand, I will write it again. I need to convert an array of JSON objects that are stored in the JSON object as a string buffer. help please.

A stringbuffer and no objects, so you can Just return the stringbuffer content or wrap it in an additional JSON markup.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -