json_finder 0.1.1

find json in a any string and deserializes it against specific structs into Vec<T>
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 8.86 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 295.28 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • elasticrash

json_finder

Scans any string for JSON objects/arrays and deserializes all matches into Vec<T>.

use serde::Deserialize;
use json_finder::find_json;

#[derive(Deserialize)]
struct Person { name: String, age: u32 }

let results: Vec<Person> = find_json(r#"noise {"name":"Alice","age":30} more noise"#);

Non-matching JSON and surrounding noise are silently skipped.

License

MIT