Given a string of JSON, and a case class that corresponds to it, what's a simple way to parse the JSON into the case class? There are many libraries available, but it seems that Scala might now do this out of the box.
What about if the JSON should be parsed into a list of the case class?
UPDATE:
Jerkson seems to be abandoned, and I don't want to install the full Play or Lift framework or anything else heavy.
I second the JSON conversion in the Play Framework.
Also take a look at Jackson which is mature. Note you will need to use Jackson Scala Module : https://github.com/FasterXML/jackson-module-scala.
A decent article providing an intro - then some code to add implicit conversions : https://coderwall.com/p/o--apg/easy-json-un-marshalling-in-scala-with-jackson
I've used https://github.com/json4s/json4s , only gripe so far is https://github.com/json4s/json4s/issues/137
For anyone bumping into this for the first time, circe is also a good option
There are several frameworks which can exactly do that.
JSON4s
JSON4s is quite mature and supports jackson or a native JSON-Parser. Used it in many projects to replace jerkson.
https://github.com/json4s/json4s
play-json
Can be used without the full play stack. Great support as part of the play project at typesafe.
http://www.playframework.com/documentation/2.0/ScalaJson
Scala-Pickling
A serialization Framework. There is an option to serialize/ and deserialize to JSON.
https://github.com/scala/pickling
Spray JSON
Can searialize and deserialize. Need to know number of arguments for deserialization tough.
https://github.com/spray/spray-json
Spray Json is pretty light weight and does exactly what you need. It's a toolkit instead of a full on framework and you can just import the Spray-json project instead of the entire project.
https://github.com/spray/spray-json
The examples can get you set up very quickly. Most of the time your code to translate to/from JSON ends up being one liners, but you have the ability to explicitly handle it in case you have some weird requirements.
Use net.liftweb
Make sure the Scala version matches the lift-json jar. For ex. for Scala 2.10 use lift-json_2.10.