GitHub user rxin opened a pull request:

    https://github.com/apache/spark/pull/9724

    [SPARK-11745][SQL] Enable more JSON parsing options

    This patch adds the following options to the JSON data source, for dealing 
with non-standard JSON files:
    * `allowComments` (default `false`): ignores Java/C++ style comment in JSON 
records
    * `allowUnquotedFieldNames` (default `false`): allows unquoted JSON field 
names
    * `allowSingleQuotes` (default `true`): allows single quotes in addition to 
double quotes
    * `allowNumericLeadingZeros` (default `false`): allows leading zeros in 
numbers (e.g. 00012)
    
    To avoid passing a lot of options throughout the file, I introduced a new 
JSONOptions case class to define all JSON config options.
    
    Also updated documentation to explain these options.
    
    Scala
    
    ![screen shot 2015-11-15 at 6 12 12 
pm](https://cloud.githubusercontent.com/assets/323388/11172965/e3ace6ec-8bc4-11e5-805e-2d78f80d0ed6.png)
    
    Python
    
    ![screen shot 2015-11-15 at 6 11 28 
pm](https://cloud.githubusercontent.com/assets/323388/11172964/e23ed6ee-8bc4-11e5-8216-312f5983acd5.png)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rxin/spark SPARK-11745

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/9724.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #9724
    
----
commit 5bcf51434e3bb4ecab00e374a5282f346aeee9dd
Author: Reynold Xin <[email protected]>
Date:   2015-11-16T02:13:45Z

    [SPARK-11745][SQL] Enable more JSON parsing options

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to