アンダースコア付きのjsonをケースクラスのcamelCaseフィールドにマップするにはどうすればよいですか?
import org.json4s.jackson.JsonMethods.parse
import org.json4s.DefaultFormats
object Testing {
implicit val formats = DefaultFormats.withBigDecimal
def test = {
val json = parse("""{"some_field":"a value"}""")
json.extract[ThingDTO]
}
}
case class ThingDTO(someField:String)
私が得るエラー:
someField に使用できる値がありません java.lang.String に変換できる値が見つかりませんでした