pyarrow.json.ParseOptions#
- class pyarrow.json.ParseOptions(explicit_schema=None, newlines_in_values=None, unexpected_field_behavior=None)#
Bases:
_Weakrefable
Options for parsing JSON files.
- Parameters:
- explicit_schema
Schema
, optional (defaultNone
) Optional explicit schema (no type inference, ignores other fields).
- newlines_in_valuesbool, optional (default
False
) Whether objects may be printed across multiple lines (for example pretty printed). If false, input must end with an empty line.
- unexpected_field_behavior
str
, default “infer” How JSON fields outside of explicit_schema (if given) are treated.
Possible behaviors:
“ignore”: unexpected JSON fields are ignored
“error”: error out on unexpected JSON fields
“infer”: unexpected JSON fields are type-inferred and included in the output
- explicit_schema
- __init__(*args, **kwargs)#
Methods
Attributes
Optional explicit schema (no type inference, ignores other fields)
Whether newline characters are allowed in JSON values.
How JSON fields outside of explicit_schema (if given) are treated.
- equals(self, ParseOptions other)#
- Parameters:
- Returns:
- explicit_schema#
Optional explicit schema (no type inference, ignores other fields)
- newlines_in_values#
Whether newline characters are allowed in JSON values. Setting this to True reduces the performance of multi-threaded JSON reading.
- unexpected_field_behavior#
How JSON fields outside of explicit_schema (if given) are treated.
Possible behaviors:
“ignore”: unexpected JSON fields are ignored
“error”: error out on unexpected JSON fields
“infer”: unexpected JSON fields are type-inferred and included in the output
Set to “infer” by default.