meilisearch/crates/flatten-serde-json/src/main.rs
2024-10-21 08:18:43 +02:00

12 lines
279 B
Rust

use std::io::stdin;
use flatten_serde_json::flatten;
use serde_json::{Map, Value};
fn main() {
let json: Map<String, Value> = serde_json::from_reader(stdin()).unwrap();
let result = flatten(&json);
println!("{}", serde_json::to_string_pretty(&result).unwrap());
}