From c6b113479e2d876837e1b3e160f943fc17c93c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sun, 29 Dec 2019 14:53:24 +0100 Subject: [PATCH] correct readme --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 766d7b0..6d1bc68 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,8 @@ The JSON can also be manipulated: - `obj.dot_set("fruit.>.name", "tangerine")` ... set the last fruit's name - `obj.dot_set("fruit.>", Value::Null)` ... append a JSON null - `obj.dot_set("fruit.<", true)` ... prepend a JSON true -- `obj.dot_set("vegetables.onion.>", "aaa")` ... add `{"vegetables":{"onion":["aaa"]}}` to the object +- `obj.dot_set("vegetables.onion.>", "aaa")` ... add `"vegetables": {"onion":["aaa"]}` to the outer object + (the parent map and array are created automatically) Any serializable type or `serde_json::Value` can be stored to or retrieved from the nested object (`Value::Object`, `Value::Array`, `Value::Null`).