Github user yhuai commented on the pull request:

    https://github.com/apache/spark/pull/3213#issuecomment-63156674
  
    @dwmclary Thank you for working on it. I think we need to handle complex 
types. The approach @NathanHowell is using looks good since we do not need to 
convert Scala collections to Java collections to generate the JSON string.
    
    Regarding the Python API, `toJSON` will returns a Scala RDD and I think you 
can use `jrdd = self._jvm.JavaRDD.fromRDD` to generate a Java RDD and then 
[create an RDD at the Python 
side](https://github.com/apache/spark/blob/master/python/pyspark/rdd.py#L123) 
(`RDD(jrdd, self._sc, self._jrdd_deserializer)`). @davies is it the right way?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to