You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Muhammad (Jira)" <ji...@apache.org> on 2025/12/31 14:14:00 UTC

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

Muhammad created SPARK-54878:
--------------------------------

             Summary: 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


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