4 ms·
For processing JSON in Clojure, I've used zippers, modifying the tree or leaf nodes by protocol dispatch. More because it seems how the task is "supposed" to be
by fnordsensei 8y ago
For processing JSON in Clojure, I've used zippers, modifying the tree or leaf nodes by protocol dispatch. More because it seems how the task is "supposed" to be done in Clojure rather than based on any particular understanding of whether there are alternative methods out there, and if so, which would be the better method.
I found this blog post discussing the differences between visitors and zippers: http://www.ibm.com/developerworks/library/j-treevisit/index.html http://www.ibm.com/developerworks/library/j-treevisit/index....
(Written in 2011. In the article, multimethods are used rather than protocols)