Skip to content

Don't infer schema from the first object in an array #207

@sa-

Description

@sa-

This throws an error KeyError: key :a not found

using DataFrames, JSON3
lines = [
    """{"a": 1}""",
    """{"b": 2}""",
]
DataFrame(JSON3.read.(lines))

This ignores column b

lines = [
    """{"a": 1}""",
    """{"a": 2, "b": 2}""",
]
DataFrame(JSON3.read.(lines))

I would expect this input:

lines = [
    """{"a": 1}""",
    """{"b": 2}""",
]
DataFrame(JSON3.read.(lines))

to have this output:

│ Row │ a      │ b      │
│     │ Union… │ Union… │
├─────┼────────┼────────┤
│ 1   │ 1      │        │
│ 2   │        │ 2      │

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions