#json #fix-json #bad-json

dirty-json

修复脏JSON字符串

1 个不稳定版本

0.1.0 2020年8月9日

#1099#json

MIT 许可证

4KB

dirty-json-rs

GitHub Actions Crates.io docs.rs

修复脏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