You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/03/10 05:56:00 UTC

[jira] [Updated] (SPARK-54878) Support sort_keys option inside to_json

     [ https://issues.apache.org/jira/browse/SPARK-54878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated SPARK-54878:
-----------------------------------
    Labels: pull-request-available  (was: )

> Support sort_keys option inside to_json
> ---------------------------------------
>
>                 Key: SPARK-54878
>                 URL: https://issues.apache.org/jira/browse/SPARK-54878
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 4.1.0
>            Reporter: Muhammad
>            Priority: Minor
>              Labels: pull-request-available
>
> Currently [to_json() function|https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.to_json.html] doesn't support the [sort options|https://spark.apache.org/docs/latest/sql-data-sources-json.html#data-source-option]. Adding that option would provide ease in comparing JSONs from map object types. The implementation should be quite similar to the sort_keys option supported by [Python's json.dumps()|https://docs.python.org/3/library/json.html] method, where it recursively sorts the keys.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org