Parsing JSON in Scala
Introduction
I started a side project on Scala with a group of friends (noobs in scala). We chose Scala because it is well known for type safety and functional programming with support for OOP.
One of the important parts of the project was speaking to a REST API which returned JSON responses.
We began our hunt for efficient JSON parsers on scala and soon we were flooded with libraries:
- spray-json
- jerkson
- jackson
- json4s
- jacksMapper
With so many options, we were confused! Thanks to this wonderful post from Ooyala Engineering team for putting up a nice comparison of libraries. Finally, we decided to go ahead with json4s because we found it handy to extract objects out of the JSON and also the support it has for Jackson (faster parsing).
Problem
The problem with most of the libraries listed above, especially json4s, is the poor documentation. The examples given are straight forward...