mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-26 06:30:05 +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());
|
|
}
|