You work with JSON files in this project by using serde_json to serialize and deserialize data, or by piping JSON through mdbook preprocessors like mdbook-trpl-note which read from stdin and write to stdout.
use serde_json;
let data = serde_json::from_str::<serde_json::Value>(r#"{"key": "value"}"#)?;
let json = serde_json::to_string_pretty(&data)?;
For mdBook preprocessing, run the binary directly to transform JSON input:
echo '{"book": {"sections": []}}' | cargo run --bin mdbook-trpl-note
The mdbook-trpl binaries (mdbook-trpl-note, mdbook-trpl-listing, mdbook-trpl-heading, mdbook-trpl-figure) expect JSON input from stdin and output processed JSON to stdout, as defined in their main functions using serde_json::to_writer.