[−][src]Crate lincolns
A JSON Pointer index for line/column information within JSON and YAML content
Example
The following loads YAML content into a structure that can be queried by JSON Pointer paths
ⓘThis code runs with edition 2018
use lincolns::{from_str, Position}; let positions = from_str( r#"foo: - bar: baz boom: true "# )?; assert_eq!( positions.get("/foo/0/boom"), Some( &Position { line: 3, col: 6 } ) ); assert_eq!( positions.get("/foo/0/zoom"), None );
Structs
Position | Line and column position of content in a file |
Positions | A table of |
Enums
Error | Possible errors that may occur while loading content |
Functions
from_reader | Load a lookup table of |
from_str | Load a lookup table of |
Type Definitions
Result |