Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.42 KB | None | 0 0
  1.  
  2.  
  3. import scala.util.parsing.json._
  4. import scala.io.Source
  5. import JSON._
  6.  
  7.  
  8. object test {
  9.     def main( args : Array[String] )
  10.     {
  11.         // read file
  12.         val source = Source.fromFile(args(0), "utf-8")
  13.         val lines = source.getLines
  14.  
  15.         val rest = for { line <- lines } yield { parseJSON(line) }
  16.         val bla = for { v <- rest } yield { v.word }
  17.         bla foreach println
  18.         source.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement