serde_ltsv 0.1.0

LTSV serialization using serde.
Documentation
# serde_ltsv

[![Build Status](https://travis-ci.org/cdumay/rust-serde_ltsv.svg?branch=master)](https://travis-ci.org/cdumay/rust-serde_ltsv) 
[![Latest version](https://img.shields.io/crates/v/serde_ltsv.svg)](https://crates.io/crates/serde_ltsv)
[![Documentation](https://docs.rs/serde_ltsv/badge.svg)](https://docs.rs/serde_ltsv) 
![License](https://img.shields.io/crates/l/serde_ltsv.svg)

Labeled Tab-separated Values (LTSV) format is a variant of Tab-separated Values (TSV). Each
record in a LTSV file is represented as a single line. Each field is separated by TAB and has
a label and a value. The label and the value have been separated by ':'. With the LTSV format,
you can parse each line by spliting with TAB (like original TSV format) easily, and extend any
fields with unique labels in no particular order.

```rust
time:[10/Oct/2000:13:55:36 -0700]\tdone:true\tscore:-1\tmean:0.42\tcounter:42\tlevel:3\thost:testhostname\tname1:value1\tname 2: value 2\tn3:v3\tmessage:this is a test
```

## Quickstart

You can start using it by first adding it to your `Cargo.toml`:

```toml
[dependencies]
serde_derive = "1.0"
serde_ltsv = "0.1"
```

Then, create a structure which implement `serde::Serialize` / `serde::Deserialize` traits and
use the structure with any serde lib.

```rust
#[macro_use]
extern crate serde_derive;
extern crate serde_ltsv;
extern crate serde_json;
extern crate serde_yaml;

#[derive(Serialize, Deserialize)]
struct Foo {
    a: String,
    b: i8,
    c: bool
}

fn main() {
    let t = Foo { a: "toto".into(), b: 8, c: true };
    let str_t = serde_ltsv::to_string(&t).unwrap();
    println!("As ltsv => {}", &str_t);
    let t2: Foo = serde_ltsv::from_str(&str_t).unwrap();
    println!("As json => {}", serde_json::to_string_pretty(&t2).unwrap());
    println!("As yaml => {}", serde_yaml::to_string(&t2).unwrap());
}
```
**Output**:
```
As ltsv => a:toto	b:8	c:true
As json => {
    "a": "toto",
    "b": 8,
    "c": true
}
As yaml => ---
a: toto
b: 8
c: true
```

License: BSD-3-Clause