Skip to content

Commit

Permalink
docs(README): *usage* added
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed May 6, 2015
1 parent dbf42ec commit e9cc19e
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,28 @@ This library contains a collection of tools to help interacting with json encode
- A utility to filter lexical tokens which belong to keys that have null values.
This makes easy to re-assemble json data streams and strip them off their null values.


# Usage
[![Build Status](https://travis-ci.org/Byron/json-tools.svg?branch=master)](https://travis-ci.org/Byron/json-tools)
Add this to your *Cargo.toml*
```toml
[dependencies]
json-tools = "*"
```

Add this to your lib ...
```Rust
extern crate json_tools;

use json_tools::Lexer;

for token in Lexer::new(r#"{ "face": "😂" }"#.chars()) {
println!("{:?}", token);
}
```

# Motivation

This library may possibly never grow bigger than the 2 features originally mentioned, as it was created
as a workaround to missing features in [`serde`](https://github.com/serde-rs/serde).
as a workaround to missing features in [`serde`](https://github.com/serde-rs/serde).

0 comments on commit e9cc19e

Please sign in to comment.