I can extend RootJsonFormat in order to support more than 22 fields on the case class. However, my case class also contains nested objects and Option[Int] and Option[String]. How can I serialize those? The nested objects do not have more than 22 fields. I found a similar question on SO but unfortunately, I cannot get it working. Not sure what was meant by Tuple22 in the response.
How to serialize more than 22 fields with nested object in spray?
176 views Asked by Mejmo At
1
as this answer said, you can
Providing JsonFormats for other Types, that means you can make you case class serialized by override implement you own write/read method.here is a sample of how to approach it.