pyarrow.json.ParseOptions — Apache Arrow v20.0.0 (original) (raw)
class pyarrow.json.ParseOptions(explicit_schema=None, newlines_in_values=None, unexpected_field_behavior=None)#
Bases: _Weakrefable
Options for parsing JSON files.
Parameters:
explicit_schemaSchema, optional (default None)
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_behaviorstr, 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
__init__(*args, **kwargs)#
Methods
Attributes
equals(self, ParseOptions other)#
Parameters:
otherpyarrow.json.ParseOptions
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.