Scala Macros: Making a Map out of fields of a class in Scala

后端 未结 3 704
孤独总比滥情好
孤独总比滥情好 2020-11-29 19:42

Let\'s say that I have a lot of similar data classes. Here\'s an example class User which is defined as follows:

case class User (name: String,          


        
3条回答
  •  渐次进展
    2020-11-29 19:58

    There is an excellent blog post on map to/from case class conversion using macros.

提交回复
热议问题