[ https://issues.apache.org/jira/browse/SPARK-22835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maciej Bryński resolved SPARK-22835. ------------------------------------ Resolution: Invalid > Spark toJSON gives wrong results when there is quote sign in value > ------------------------------------------------------------------ > > Key: SPARK-22835 > URL: https://issues.apache.org/jira/browse/SPARK-22835 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.1.1 > Reporter: Maciej Bryński > > When there is a quote in field value toJSON method gives wrong results. > {code} > >>> spark.range(1).selectExpr('concat("\\"", id, "\\"") as > >>> c').toJSON().collect() > ['{"c":"\\"0\\""}'] > {code} > The result is not a valid json. > https://jsonlint.com/ -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org