播放 json 扩展
play-json实用程序扩展库
特征
轻松转换密钥
import play . api . libs . json . ext . _
...
val madoka = JsObject (
Seq (
" firstName " - > JsString ( " Madoka " ),
" lastName " - > JsString ( " Kaname " )
)
)
val snakified = madoka.snakifyKeys()
snakified.camelizeKeys()
只需根据需要转换密钥,您就不会得到任何StackOverFlow
轻松序列化json
val complex = largeJson( 20000 )
complex.safeToString() // no stackov
2021-06-07 20:03:36
8KB
Scala
1