2011-10-11 58 views
0

我想用scala.util.parsing.json中的JSON库来解析JSON文件。我能够读取和解析JSON文件,但是如何将两个JSON文件组合在一起? (第二个文件中的重叠值应该覆盖第一个文件)。斯卡拉 - 合并两个JSON文件

回答

2

对于Scala,建议使用liftweb json库。这是功能丰富和更广泛接受的JSON库比斯卡拉内部的一个。合并在liftweb json库中可用,

http://olim7t.github.com/liftweb-2.0-release-sxr/net/liftweb/json/Merge.scala.html

+0

由谁推荐? * [引用需要] –

+0

请参阅http://stackoverflow.com/questions/927983/how-can-i-construct-and-parse-a-json-string-in-scala-lift和http:// scala-programming -language.1934581.n4.nabble.com/Does-scala-util-parsing-json-JSON-worth-trying-td3234964.html –