plicit lazy val formats =
org.json4s.DefaultFormats
val image = (json \ "name").extract[String]
}
)
Thanks for your help.
--
View this message in context:
http://apache-spark-user-list.1001560.n3.nabble.com/Parsing-Json-object-definition-spanning-multiple-lines-tp9659.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
would
> like to know if it is possible to parse a Json object definition that spans
> multiple lines, directly in Spark.
>
> val inp = sc.textFile(args(0))
> val res = inp.map(line => { parse(line) })
> .map(json =>
> {
>
on object definition that spans
multiple lines, directly in Spark.
val inp = sc.textFile(args(0))
val res = inp.map(line => { parse(line) })
.map(json =>
{
implicit lazy val formats =
org.json4s.DefaultFormats
val image = (jso