lib.rs
JsonSession
Every JsonFragmentWithSpan has location information attached to it, saying at which byte offset (and at which line and column) the relevant fragment began and ended. The code was originally based on tinyjson. MIT licensed. lib.rs: Streaming parser for JSON.
line-numbers
1,790 downloads per month Used in 6 crates (4 directly). MIT license . 13KB 223 lines. line-numbers . line-numbers is a Rust crate for efficiently finding the line number of a string offset. Usage. Create a LinePositions, then you can find line numbers for an offset.. let s = "foo\nbar\nbaz\n"; let s_lines: Vec<_> = s.lines().collect(); let line_positions = LinePositions::from(s); let offset ...