What is a good library for JSON serialization for Scala 2.8.1 for use in Eclipse

最后都变了- 提交于 2019-12-06 00:31:10

If you look at the fork graph of that repo, you will see ginkel's version of sjson with:

Writing REST services with Jersey (in Java) is what I do every day at work. I use the integration Jersey has with Jackson for JSON serialization and deserialization. Using another library with Jersey would be swimming upstream. You're using a REST library written in Java, so why not a JSON library in Java too, especially since it just works out of the box?

When I want to write a Scala REST service, I use SBT, the Scalatra web framework and lift-json. It works great.

I don't use Eclipse, but the selection of JSON library is orthogonal to what IDE/editor/etc you use. I would certainly never want to choose a library based on its ability to play nice in Eclipse.

If you're interested in using Scala to write a REST service (very quickly), start with this tutorial: http://blog.everythings-beta.com/?p=430

Add some case classes and lift-json support for parsing them. Excellent examples here: https://github.com/lift/lift/tree/master/framework/lift-base/lift-json/ (scroll down) You can add lift-json to your SBT project with:

val lift_json = "net.liftweb" %% "lift-json" % "2.1"

I've found lift-json excellent for both parsing and generating JSON. But if I'm using Jersey, I use the built in support for Jackson, since it is excellent and there's no reason to use anything else.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!