Categories

See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More

How to receive Json data from Server URL?

General Tech Bugs & Fixes

Max. 2000 characters
Replies

usr_profile.png

User

( 6 months ago )

I am trying to send json request using marshalling logic to server? How to get json as response from server ? Do i have to parse it using below parser?

final SAXParserFactory sp = SAXParserFactory.newInstance();
final SAXParser sp1 = sp.newSAXParser();

usr_profile.png

User

( 6 months ago )

The data format of the results depend on what your server response to you . you can translate the result string responsed by the server to pojo no mater the data format is xml or json .

If data format is xml , you can use JAXB to translate it to pojo

If data format is json ,you can use Gson to translate it to pojo

If you want to directly translte xml to json . Maybe gson-xml library can help you.

what's your interest


forum_ban8_5d8c5fd7cf6f7.gif