json_macro 0.1.1

Pure json macro for rust_serialize. No need compiler features.
Documentation
  • Coverage
  • 0%
    0 out of 3 items documented0 out of 0 items with examples
  • Size
  • Source code size: 3.39 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.1 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 13s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • therustmonk/json_macro
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • therustmonk

json_macro

Macro for rust_serialize crate realized with standard macro_rule (no needs compiler features).

Dependencies

Add this to your Cargo.toml:

[dependencies]

json_macro = "*"

and this to your crate root:

#[macro_use]
extern crate json_macro;

Usage

Use macro this way:

let s = json!("string");
let f = json!(3.1f64);
let a = json!([1,2,3,4,5]);
let o = json!({
	"one" => 1,
	"sub" => (json!({
		"two" => 2
	}))
});