Re: json parsing with json4s

2014-06-12 Thread Tobias Pfeiffer
Hi, I usually use pattern matching for that, like json \ "key" match { case JInt(i) => i; case _ => 0 /* default value */ } Tobias On Thu, Jun 12, 2014 at 7:39 AM, Michael Cutler wrote: > Hello, > > You're absolutely right, the syntax you're using is returning the json4s > value objects, not na

Re: json parsing with json4s

2014-06-11 Thread Michael Cutler
Hello, You're absolutely right, the syntax you're using is returning the json4s value objects, not native types like Int, Long etc. fix that problem and then everything else (filters) will work as you expect. This is a short snippet of a larger example: [1] val lines = sc.textFile("likes.jso