Fix redundant API syntax
The "value" key is excessive, one can just feed the value!
curl -X POST http://localhost:3000/lists/mylist/items \
-d '{"value": "item1"}' -H "Content-Type: application/json"
curl -X PUT http://localhost:3000/lists/mylist/0 \
-d '{"value": "item1"}' -H "Content-Type: application/json"
curl -X PUT http://localhost:3000/dicts/mydict/mykey \
-d '{"value": "value1"}' \
-H "Content-Type: application/json"
Side note: #3 (closed) is solved, but I could consider this later:
use serde_json::Value;
pub type SharedVectors = Arc<Mutex<HashMap<String, Vec<Value>>>>;
pub type SharedHashMaps = Arc<Mutex<HashMap<String, HashMap<String, Value>>>>;
I'm on the fence about it, though. I see some limits in what I do now as an advantage and I don't want dig Serde
deeply yet.
Edited by Victor Gridnevsky