修复脏JSON字符串
由 messense 提供
#1099 在 #json
4KB
dirty-json 允许使用数字对象键。
dirty-json
fn main() { let json = r#"{1: "foo", 2 : "bar"}"#; let fixed = dirty_json::fix(json); assert_eq!(fixed, r#"{"1":"foo","2":"bar"}"#); }
本作品根据MIT许可证发布。许可证副本可在LICENSE文件中找到。
~28KB