How do I expose data in a JSON format through a web service using Java?

后端 未结 9 1886
攒了一身酷
攒了一身酷 2021-01-30 14:23

Is there an easy way to return data to web service clients in JSON using java? I\'m fine with servlets, spring, etc.

9条回答
  •  滥情空心
    2021-01-30 15:03

    To me, the best Java <-> JSON parser is XStream (yes, I'm really talking about json, not about xml). XStream already deals with circular dependencies and has a simple and powerful api where you could write yours drivers, converters and so on.

    Kind Regards

提交回复
热议问题