codahale/jerkson — Issue #43: Deserialize to Scala collection for values of unknown type
Author: vdichev
Created: 2011-12-01 08:12:34+00:00
State: open

It would be great to be able to deserialize to a Scala collection instead of Java collections when you don't know what your input would be. There are use cases when you know you could have a Map just as well as a List, so your options are either to use `parse[JValue]` or `parse[Any]`. The problem is that these both get back java collections, and you can't pattern match them or flatMap them, etc.

Of course, there *is* the workaround to convert from JValues (or Java collections) to scala collections every time, but you lose some performance.