How to Convert XML to JSON

May 23, 2011

Download lift-json jar from

Be sure to grab the proper library for your Scala version, at time of this post the latest was located at

import net.liftweb.json._
import net.liftweb.json.JsonAST._

val data = xml.XML.loadFile("quotie.xml")
val str = Printer.pretty(render(Xml.toJson(data)))

var out_file = new"quotie.json")
var out_stream = new