I am parsing a json response from a web service which has some fields defined using hyphens. I want to convert these names to mixed case names in my scala case class. I thought to use the camelizeKeys stipulation but it doesn't seem to work. So for example say I have a json response like:
{"offset":0,"total":359,"per-page":20}
to be converted to:
case class Response(offset: Int, total: Int, perPage: Int)
and I do:
parse(str).camelizeKeys.extract[Response]
I get the error:
Ex: org.json4s.package$MappingException: No usable value for perPage Did not find value which can be converted into int