# pdl [](https://travis-ci.org/flier/rust-pdl) [](https://ci.appveyor.com/project/flier/rust-pdl) [](https://crates.io/crates/pdl) [](https://docs.rs/crate/pdl/) [](https://deps.rs/repo/github/flier/rust-pdl)
Parse PDL file for the Chrome DevTools Protocol.
## Usage
To use `pdl` in your project, add the following to your Cargo.toml:
```toml
[dependencies]
pdl = "0.1"
```
## Example
Use `pdl::parse` to parse a PDL file as strongly typed data structures.
```rust
let mut f = File::open("browser_protoco.pdl")?;
let mut s = String::new();
f.read_to_string(&mut s)?;
let (rest, proto) = pdl::parse(&s)?;
println!("PDL: {}", proto);
println!("JSON: {}", proto.to_json_pretty());
```
For more detail, please check the `parser` example.
```sh
$ cargo run --example parser -- browser_protocol.pdl --json --output browser_protocol.json
```