summaryrefslogtreecommitdiffstats
path: root/vendor/write-json/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/write-json/README.md')
-rw-r--r--vendor/write-json/README.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/vendor/write-json/README.md b/vendor/write-json/README.md
new file mode 100644
index 000000000..ddb95aaaf
--- /dev/null
+++ b/vendor/write-json/README.md
@@ -0,0 +1,23 @@
+# write-json
+
+
+Simple {dependency,trait,macro}-less JSON serialization
+
+
+```rust
+let mut buf = String::new();
+
+{
+ let mut obj = write_json::object(&mut buf);
+ obj.string("name", "Peter").number("favorite number", 92.0);
+ obj.array("films")
+ .string("Drowning By Numbers")
+ .string("A Zed & Two Noughts");
+ obj.null("suitcase");
+}
+
+assert_eq!(
+ buf,
+ r#"{"name":"Peter","favorite number":92,"films":["Drowning By Numbers","A Zed & Two Noughts"],"suitcase":null}"#
+)
+```