egui_json_tree
An interactive JSON tree visualiser for egui
, with search and highlight functionality.
Usage
use ;
use ;
let value = json!;
// Simple:
new.show;
// Customised:
let response = new
.style
.default_expand
.response_callback
.abbreviate_root // Show {...} when the root object is collapsed.
.show;
// Reset the expanded state of all arrays/objects to respect the `default_expand` setting.
response.reset_expanded;
See demo.rs and run the examples for more detailed use cases, including the search match highlight/auto expand functionality, and how to copy JSON paths and values to the clipboard.
JsonTree
can visualise any type that implements value::ToJsonTreeValue
. Implementations to support serde_json::Value
(enabled by default by the crate feature serde_json
) and simd_json::owned::Value
(optionally enabled by the crate feature simd_json
) are provided with this crate. If you wish to use a different JSON type, see the value
module, and disable default features in your Cargo.toml
if you do not need the serde_json
dependency.
Run Examples