spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maciej Bryński (JIRA) <j...@apache.org>
Subject [jira] [Created] (SPARK-22835) Spark toJSON gives wrong results when there is quote sign in value
Date Tue, 19 Dec 2017 21:51:00 GMT
Maciej Bryński created SPARK-22835:
--------------------------------------

             Summary: 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message