mirror of
https://codeberg.org/icewind/php-literal-parser.git
synced 2026-06-03 10:34:08 +02:00
No description
- Rust 99.6%
- Nix 0.4%
| .github/workflows | ||
| examples | ||
| src | ||
| .gitignore | ||
| Cargo.toml | ||
| README.md | ||
php-literal-parser
parser for php literals.
Usage
use php_literal_parser::parse;
use std::error::Error;
fn main() -> Result<(), Box<dyn Error>> {
let map = parse(r#"["foo" => true, "nested" => ['foo' => false]]"#)?;
assert_eq!(map["foo"], true);
assert_eq!(map["nested"]["foo"], false);
Ok(())
}