mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-23 21:34:27 +01:00
12 lines
279 B
Rust
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());
|
|
}
|