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
9
10
11
12
13
14
15
16
// json_fixer/benches/fix_benchmark.rs
use criterion::{criterion_group, criterion_main, Criterion};
use json_fix::fix_json_syntax;

fn benchmark_fix_json_syntax(c: &mut Criterion) {
    let broken_json = r#"{"emotion": "hopeful, \"score": 80}"#;

    c.bench_function("fix_json_string", |b| {
        b.iter(|| {
            let _ = fix_json_syntax(broken_json);
        });
    });
}

criterion_group!(benches, benchmark_fix_json_syntax);
criterion_main!(benches);