I am trying to extract values from the json dataset where each record has n > 22 key-value pairs. In order to do so, I implemented a case class with n member variables. However, the scala 2.10.x compiler reported "Implementation restriction: case classes cannot have more than 22 parameters."
It seems the problem come from the limitation of the scala compiler, but is there any detour to solve this problem?
UPDATE:
I tried to decompose the big case classes into smaller one (use nested case class), but the program cannot correctly parse the json in that case. I think the implementation of json4s does not allow us to do so.
1: Switch to scala 2.11
2: Use nested case classes. For example if you have big model for 'Person' class you can split it like this: