Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/22442#discussion_r220407196
--- Diff: python/pyspark/sql/functions.py ---
@@ -2328,11 +2328,14 @@ def to_json(col, options={}):
@ignore_unicode_prefix
@since(2.4)
-def schema_of_json(col):
+def schema_of_json(col, options={}):
"""
Parses a column containing a JSON string and infers its schema in DDL
format.
:param col: string column in json format
+ :param options: options to control parsing. accepts the same options
as the JSON datasource
+
+ .. note:: Since Spark 2.5, it accepts options to control schema
inferring.
--- End diff --
Let's convert this to:
```
.. versionchanged:: 2.5
it accepts `options` parameter to control schema inferring.
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]