How to convert JSON to a type in Scala

后端 未结 5 1819
野性不改
野性不改 2021-02-19 04:06

My problem is I receive an JSON text from say, twitter. Then I want to convert this text to an native object in scala. Is there a standard method to do this? I\'m also using Pla

5条回答
  •  南笙
    南笙 (楼主)
    2021-02-19 04:14

    convert to jsvalue by using Json.parse(string) then add operator as[T] to extract the value

提交回复
热议问题