问题
I'm sure there is a simple way to do this, but I haven't found a way to do it. How do I go about parsing a simple json array: [1] as a List[Integer] or List[String] with the play framework Json Library in scala?
All of the examples I have seen in the documentation assume you are working with an object and are accessing an attribute in the object. When I try to parse the json I get an error:
jsonResult.as[List[String]]
JsError(List((,List(ValidationError(error.expected.jsarray,WrappedArray())))))
来源:https://stackoverflow.com/questions/27365763/parse-simple-json-array-in-play-framework