简体   繁体   中英

Best way to parse JSON data from Mobile client to webservice

I have developed a small iphone app. The iphone app is saving data locally. As soon the user goes online I would like to parse the data to the server over a JSON stream.

I however don't know how I should solve the server side with Java.

  • How can I receive a JSON feed to for example JAX-RS/Jersey that contains 5000 records and process it?
  • Can I process JSON as a stream to keep a low memory footprint? Or is it possible to process it in junks? Such as 100 records in one go?

It would be cool if you could tell me how to do that in Java. I'm really struggling here and unable to find information what's the best way of doing it.

Up to now I looked at JAX-RS, Jackson and SAX but I can't find a good example how to use these libraries for my particular case. Also I want to stick to best practices which I'm sure you guys can offer.

Thanks for your help, Chris

All you need is create java web service that would consume json response and do processing.


Here is the Approach , this shows exposing json data but you should be able to figure out consuming of json data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM