Expand description
JSON view widget for pretty-printing JSON text.
Renders formatted JSON with indentation and optional syntax highlighting. Does not depend on serde; operates on raw JSON strings with a minimal tokenizer.
§Example
use ftui_widgets::json_view::JsonView;
let json = r#"{"name": "Alice", "age": 30}"#;
let view = JsonView::new(json);
let lines = view.formatted_lines();
assert!(lines.len() > 1); // Pretty-printed across multiple linesStructs§
- Json
View - Widget that renders pretty-printed JSON with syntax coloring.
Enums§
- Json
Token - A classified JSON token for rendering.