2
import com.alibaba.fastjson.JSON
object test {
def main(args: Array[String]) = {
val map = new util.HashMap[CharSequence, CharSequence]()
map.put("123", "22333")
map.put("test", null)
val ret = JSON.toJSONString(map)
println(ret)
}
}
toJSONString
functiones:あいまいな参照するときのJavaライブラリでの呼び出し方法
エラー:何らかの理由で
Error: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 (java.util.HashMap[CharSequence,CharSequence])
val ret = JSON.toJSONString(map)
https://issues.scala-lang.org/browse/SI-8344ここで 'f(a、b、c)'は 'f(Tuple3(a、b、c))'とみなされます。 –