mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 03:55:07 +08: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());
|
|
}
|