book.rs
464 B · rust · 15 lines
1use mrlycore::json;23fn main() {4 let map: serde_json::Map<String, serde_json::Value> = mrlyfont::map()5 .into_iter()6 .map(|(c, rows)| {7 let path: Vec<[usize; 2]> = mrlyfont::path(c)8 .into_iter()9 .map(|(r, col)| [r, col])10 .collect();11 (c.to_string(), json!({ "rows": rows, "path": path }))12 })13 .collect();14 println!("{}", serde_json::Value::Object(map));15}