Skip to content

[BUG]: No fields are outputted #2818

@floriangosse

Description

@floriangosse

Issue Type

Quicktype output or input parsing – not clear.

Context (Environment, Version, Language)

Input Format: JSON
Output Language: Typescript, Swift, C#, ...

CLI, npm, or app.quicktype.io: CLI and package
Version: 23.2.6

Description

When trying to generate an output for an JSON object with more than 49 keys on the root. The output doesn't contain any field information anymore or depending on the output it doesn't output anything.

Input Data

Generate input data with jq:

echo 'null' | jq '[range(50)] | map({ key: ("key" + tostring), value: "x" }) | from_entries'

Expected Behaviour / Output

It should output a class/object type with the keys "key0" - "key49"

Current Behaviour / Output

The output doesn't contain any field information anymore or depending on the output it doesn't output anything.

Steps to Reproduce

Output: Typescript types

echo 'null' | jq '[range(50)] | map({ key: ("key" + tostring), value: "x" }) | from_entries' | npx quicktype --src-lang json --just-types -l ts

Possible Solution

It feels like there is some hard coded limit. If it's the case, it should be made configurable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions