How can I use Gson in Scala to serialize a List?

后端 未结 5 963
感动是毒
感动是毒 2021-01-04 09:54

I was hoping to use Scala and Gson together. It seems to mostly work, but when I do something like this, it treats the list as an object, not an array:

case          


        
5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-04 10:14

    Or other suggestions

    The Jackson add-on jackson-module-scala provides some scala support, including serialization of lists.

提交回复
热议问题