Currie
Date: Wednesday, September 9, 2015 at 10:17 AM
To: Kevin Chen , "dev@spark.apache.org"
Cc: Matt Cheah , Mingyu Kim
Subject: Fwd: Deserializing JSON into Scala objects in Java code
Kevin,
I'm not a Spark dev, but I maintain the Scala module for Jackson. If you'r
Hi Kevin,
This code works fine for me (output is "List(1, 2)"):
import org.apache.spark.status.api.v1.RDDPartitionInfo;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.module.scala.DefaultScalaModule;
class jackson { public static void main(String[] args) throws
Hi Marcelo,
Thanks for the quick response. I understand that I can just write my own
Java classes (I will use that as a fallback option), but in order to avoid
code duplication and further possible changes, I was hoping there would be
a way to use the Spark API classes directly, since it seems th
Hi Kevin,
How did you try to use the Scala module? Spark has this code when
setting up the ObjectMapper used to generate the output:
mapper.registerModule(com.fasterxml.jackson.module.scala.DefaultScalaModule)
As for supporting direct serialization to Java objects, I don't think
that was the g
Hello Spark Devs,
I am trying to use the new Spark API json endpoints at /api/v1/[path]
(added in SPARK-3454).
In order to minimize maintenance on our end, I would like to use
Retrofit/Jackson to parse the json directly into the Scala classes in
org/apache/spark/status/api/v1/api.scala (Applica