Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import scala.util.parsing.json._
- import scala.io.Source
- import JSON._
- object test {
- def main( args : Array[String] )
- {
- // read file
- val source = Source.fromFile(args(0), "utf-8")
- val lines = source.getLines
- val rest = for { line <- lines } yield { parseJSON(line) }
- val bla = for { v <- rest } yield { v.word }
- bla foreach println
- source.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement