The following converts the Clojure ( object ) map to JSON and prints it to the console as an object, which therefore allows browsers to test JSON functionality:
(.dir js/console (clj->js object))
EDIT : while the pretty pretty print is really good, in the developer console I still prefer the ability to view the data structure like a tree and now use cljs-devtools often . This is a library that gives you an interactive data tree that can be expanded as a regular js object, but for vanilla Clojure without having to convert to js, ββwhich means :keywords , {:ma "ps"} , and the rest of the clj family,
At the moment, this requires you to add leiningen dependencies and some code to your project and use Chrome Canary.
vikeri
source share