1、scala 中使用 fastjson 时,会报错:
Error:(34, 18) ambiguous reference to overloaded definition,
both method toJSONString in object JSON of type (x$1: Any, x$2: com.alibaba.fastjson.serializer.SerializerFeature*)String
and method toJSONString in object JSON of type (x$1: Any)String
match argument types (Object) and expected result type Any
println(JSON.toJSONString(value))
解决办法:
println(JSON.toJSONString(value))
改为
println(JSON.toJSONString(info, SerializerFeature.EMPTY: _*))