move the flatten-serde-json crate inside of milli

This commit is contained in:
Tamo 2022-04-07 18:20:44 +02:00
parent ab458d8840
commit bab898ce86
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
8 changed files with 479 additions and 2 deletions

View file

@ -0,0 +1,11 @@
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());
}