简体   繁体   中英

Scala - merging two JSON files

I am trying to use the JSON library in scala.util.parsing.json to parse JSON files. I am able to read and parse a JSON file, but how do I combine two JSON files together? (the overlapping values in the second file should over-write the first).

For Scala it is recommended to use liftweb json library. Which is feature rich and more widely accepted JSON library than scala internal one. Merge is available in liftweb json library,

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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