json_str 0.3.1

Write json literals without ungainly strings.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# json_str

[![Build Status](https://travis-ci.org/KodrAus/json_str.svg?branch=master)](https://travis-ci.org/KodrAus/json_str) 
[![Latest Version](https://img.shields.io/crates/v/json_str.svg)](https://crates.io/crates/json_str)

[Docs and samples](http://kodraus.github.io/rustdoc/json_str/)

Provides an easy way to build json strings in Rust without having to use ungainly strings on `stable` and `nightly` channels.
Rust has a json-like syntax for defining structures, so it's easy to convert a valid Rust token tree into json.
This crate will also minify whitespace and standardise quotes while it's building the `String`.

On `stable`, conversion is provided by a simple macro.
On `nightly`, conversion is provided by a compiler plugin that does that sanitises the input at compile time instead of runtime.
The `nightly` channel also provides an alternative plugin for creating `&str` literals instead of `String`s, to avoid that allocation.