Clojure json and array map
In clojure you can have 3 different key types (as far as i have encountered them)
Keyword keys
{ :keyword "value" }
Unevaluated form
{ 'unevaluated "value" }
String
{ "string" "value" }
As I did not know about string keys I was stuck with ring.middleware.json/wrap-json-response because whenever i tried to
(get { "string" "value" } :string)
(get { "string" "value" } 'string)
It yield no result… And in repl you would see this map represnted as
{ string value }
It does not matther whether you evaluate string key or unevaluated form key
{ 'string value }
{ "string" value }
So that was the reason why it was so confusing
Anyway problem was solved by doing
(get { "string" "value" } "string")
Although I think, maybe it would be better to make keywords from string keys by calling clojure.walk/keywordize-keys
(:string (clojure.walk/keywordize-keys { "string" "value" }))
?