 
 (defn emit-encoded
   [em h tag o as-map-key cache]
+  (prn "EMIT ENCODED" em h tag o as-map-key cache)
   (if (= (.length ^String tag) 1)
     (let [rep (rep h o)]
       (if (string? rep)

 (reify Handler
   (tag [_ l] (if (seq? l) "list" "array"))
   (rep [_ l] (if (seq? l) (as-tag "array" l nil) l))
   (str-rep [_ _] nil))

 AsTag

(defn marshal
  [em o as-map-key cache]
  ;;(prn "marshal" o (tag o) (rep o))
  (let [h (handler o)
        tag (when h (tag h o))
        rep (when h (rep h o))]
    (if (and h tag)
      ;;(prn "marshal" tag rep)
      (case tag
        "_" (emit-nil em as-map-key cache)
