json-fix 0.1.1

Robust JSON repair engine for fixing malformed or partial JSON strings, especially from AI output
Documentation
1
2
3
4
5
6
7
8
use json_fix::fix_json_syntax;

#[test]
fn test_fix_broken_json() {
    let broken = r#"{"emotion": "hopeful, "score": 80}"#;
    let report = fix_json_syntax(broken);
    assert!(serde_json::from_str::<serde_json::Value>(&report.fixed).is_ok());
}