Earlier quoted context omitted.
Parsing JSON in Scala is very easy with lift-json: https://github.com/lift/lift/tree/master/framework/lift-base...
Is this supposed to be ironic? Considering JSON.parse( {a: "B"} )
The amusing part is that most APIs use JSON as if it were statically typed - except for null/undefined, very few APIs return values of more than one possible type for a given key[0].
It doesn't always have to be so bad, though, even in statically typed languages. For example, I created a tool in Go to automatically generate struct definitions, given an example JSON response: https://github.com/ChimeraCoder/gojson
In the time that I've been using it (since last December), I don't think I've run into any issues with an API returning an incorrect type for a particular key[1].
[0] For the record, I'm not complaining. The alternative would be a nightmare to deal with. [1] Though they do sometimes return a different object altogether; this is an issue regardless of which type system you use.