correct readme

master
Ondřej Hruška 5 years ago
parent 7d8b4ce8f6
commit c6b113479e
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 3
      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.>.name", "tangerine")` ... set the last fruit's name
- `obj.dot_set("fruit.>", Value::Null)` ... append a JSON null - `obj.dot_set("fruit.>", Value::Null)` ... append a JSON null
- `obj.dot_set("fruit.<", true)` ... prepend a JSON true - `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 Any serializable type or `serde_json::Value` can be stored to or retrieved from
the nested object (`Value::Object`, `Value::Array`, `Value::Null`). the nested object (`Value::Object`, `Value::Array`, `Value::Null`).

Loading…
Cancel
Save