Skip to content

Add built-in line numbers support for JsonText #2088

@usmonovshohruxmirzo

Description

@usmonovshohruxmirzo

Is your feature request related to a problem? Please describe.
JsonText does not show line numbers, which makes it harder to debug and reference large JSON outputs in the terminal.

Describe the solution you'd like
Add an option to enable line numbers in JsonText.

  • Example:
new JsonText(json, showLineNumbers: true);

Describe alternatives you've considered
I manually format the JSON, split it into lines, and render it using a Table with line numbers. This works but loses the native JsonText formatting, structure handling, and built-in styling.

Additional context
Useful for debugging, logging, and tools that display large JSON data in CLI apps.


Please upvote 👍 this issue if you are interested in it.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions