简体   繁体   English

Scala - 合并两个JSON文件

[英]Scala - merging two JSON files

I am trying to use the JSON library in scala.util.parsing.json to parse JSON files. 我正在尝试使用scala.util.parsing.json的JSON库来解析JSON文件。 I am able to read and parse a JSON file, but how do I combine two JSON files together? 我能够读取和解析JSON文件,但如何将两个JSON文件组合在一起? (the overlapping values in the second file should over-write the first). (第二个文件中的重叠值应覆盖第一个文件)。

For Scala it is recommended to use liftweb json library. 对于Scala,建议使用liftweb json库。 Which is feature rich and more widely accepted JSON library than scala internal one. 这是功能丰富且比scala内部更广泛接受的JSON库。 Merge is available in liftweb json library, 合并可在liftweb json库中找到,

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM