Closed ul closed 9 years ago
ah good catch, I committed a fix and I'll push it out later today
Ok, 0.2.4
should fix the issue. I now create a keyword from the key before calling name, so it should work for pretty much anything now. :)
oh, one more problem with name
— namespacing is lost! (name :x/y) => "y"
Not sure what can be done about that one unfortunately.
I don't insist, your library is great with existing functionality, but is it principal moment to not render namespaces? I think, namespaced keywords are quite common use-case. E.g., I use json-html
to render current Reagent app state in debug panel, and it has a number of namespaced keys introduced by some system (in sense of Stuart Sierra's system) components (I prefer to keep almost everything in system-wide atom if it will not impact performance). Is smth. like (->> k keyword ((juxt namespace name)) (remove nil?) (clojure.string/join "/"))
overcomplication for json-html
goals?
Ah that's a good suggestion, just pushed out a new version 0.2.5
with the improvement.
Thank you! I hope this solution will be useful not only for me.
This line is fine for keywords and strings, but bad for other cases https://github.com/yogthos/json-html/blob/master/src-cljs/json_html/core.cljs#L35