jsontree

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackMsg

type BackMsg struct{}

BackMsg is sent when the user wants to exit the JSON viewer

type KeyMap

type KeyMap struct {
	Up           key.Binding
	Down         key.Binding
	HalfPageUp   key.Binding
	HalfPageDown key.Binding
	GotoTop      key.Binding
	GotoEnd      key.Binding
	Toggle       key.Binding
	Fold         key.Binding
	ExpandAll    key.Binding
	CollapseAll  key.Binding
	Back         key.Binding
	Search       key.Binding
	NextResult   key.Binding
	PrevResult   key.Binding
	YankValue    key.Binding
	YankAll      key.Binding
	VisualMode   key.Binding
}

KeyMap defines the keybindings for the JSON tree viewer.

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns the default keybindings for the component.

func (KeyMap) FullHelp

func (k KeyMap) FullHelp() [][]key.Binding

FullHelp returns the full help bindings.

func (KeyMap) ShortHelp

func (k KeyMap) ShortHelp() []key.Binding

ShortHelp returns the short help bindings.

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the Bubble Tea model for the JSON tree viewer.

func New

func New(data interface{}) Model

New creates a new JSON tree model.

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the component.

func (*Model) SetSize

func (m *Model) SetSize(width, height int)

SetSize sets the size of the component.

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages and user input.

func (Model) View

func (m Model) View() string

View renders the JSON tree.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL