From a49febb8e42e8b4d29085a823b3a77a22c15aa6e Mon Sep 17 00:00:00 2001 From: Daniel Compton Date: Tue, 24 Oct 2017 15:28:43 +1300 Subject: [PATCH] Add docstring for jsonml->hiccup --- src/day8/re_frame/trace/app_state.cljs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/day8/re_frame/trace/app_state.cljs b/src/day8/re_frame/trace/app_state.cljs index 63c4dc0..17cf23b 100644 --- a/src/day8/re_frame/trace/app_state.cljs +++ b/src/day8/re_frame/trace/app_state.cljs @@ -35,7 +35,14 @@ (.-object (get jsonml 1)) (.-config (get jsonml 1)))))]))) -(defn jsonml->hiccup [jsonml] +(defn jsonml->hiccup + "JSONML is the format used by Chrome's Custom Object Formatters. + The spec is at https://docs.google.com/document/d/1FTascZXT9cxfetuPRT2eXPQKXui4nWFivUnS_335T3U/preview. + + JSONML is pretty much Hiccup over JSON. Chrome's implementation of this can + be found at https://cs.chromium.org/chromium/src/third_party/WebKit/Source/devtools/front_end/object_ui/CustomPreviewComponent.js + " + [jsonml] (if (number? jsonml) jsonml (let [[head & args] jsonml