Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support schema inference for top-level arrays #9482

@Rafferty97

Description

@Rafferty97

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
The JSON reader already supports reading JSON files with top-level arrays via the ReaderBuilder::new_with_field method that was introduced by #4905.

However, there doesn't seem to be corresponding functionality in the schema inference logic, which still assumes that the top-level JSON values are objects whose fields map to the fields in the schema being inferred.

Describe the solution you'd like
Either create new complementary schema inference functions, or add an option to the existing functions, that allow the user to infer the schema of a JSON file which is intended for use with ReaderBuilder::new_with_field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAny new improvement worthy of a entry in the changelog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions