This JSON object... Check it out.
{ "slogan": "Simplicity is the key to our values", "theAnswer": 42, "isAwake": true, "shoppingList: [ "water", "lightbulbs", "milk" ], "favoriteThings" { "number": 72, "color": "blue", } }
Converts to HSON (Hammock Structured Object Notation)...
./_map -> {"slogan": "String", "theAnswer": "Integer", "isAwake": "Boolean", "shoppingList": "Array", "favoriteThings": "Object" } ./slogan -> "Simplicity is the key to our values" ./theAnswer -> 42 ./isAwake -> true ./shoppingList/0 -> "water" ./shoppingList/1 -> "lightbulbs" ./shoppingList/2 -> "milk" ./favoriteThings/_map -> {"number": "Integer", "color": "String"} ./favoriteThings/number -> 72 ./favoriteThings/color -> "blue"
With that structure you can programatically follow, on the file system or mounted on something like Apache Server, the _map files getting only the data you want.
- An HTTP server that mounts any directory with HSON to perform RESTful functions on the database. -- Ability to POST JSON to an area in the tree --- curl -XPUT http://127.0.0.1:0042/favoriteStuff -d "{'color':'blue', 'sport':'pinball', 'cats': ['Reginald', 'Reggy', 'Robert James']}" --- would result in... --- curl -XGET http://127.0.0.1:0042/favoriteStuff/sport --- returns: "pinball" --- also... curl -XGET http://127.0.0.1:0042/favoriteStuff/_id --- returns a UUID added automatically. This is useful for keeping track of data. The folder directories is just the trail to the data. -- Ability to return all or some of the JSON --- curl -XGET http://127.0.0.1:0042/favoriteStuff?depth=1 --- returns: {'color':'blue', 'sport':'pinball', 'names': []} --- curl -XGET http://127.0.0.1:0042/favoriteStuff?depth=2 --- returns: {'color':'blue', 'sport':'pinball' 'names': ['Reginald', 'Reggy', 'Robert James']} -- Ability to to do range queries --- For example, http:/127.0.0.1:0042/favoriteStuff?startkey="a"&endkey="c" --- returns: {'color':'blue', 'cats': ['Reginald', 'Reggy', 'Robert James']}
I don't quite get this. Could you talk about how you'd like this to work for the KA topic tree? Thanks...!