Commit f80c383 1 parent a42b2c7 commit f80c383 Copy full SHA for f80c383
File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 754
754
:cljr clojure.lang.TaggedLiteral
755
755
:cljs TaggedLiteral)
756
756
ToJson
757
- (-to-json [value buffer]
757
+ (-to-json [{ :keys [tag form]} buffer]
758
758
(-> buffer
759
759
(json/push-string " tag" )
760
- (json/push-string (name (:tag value)))
761
- (to-json (:form value)))))
760
+ (json/push-string
761
+ (if-let [ns (namespace tag)]
762
+ (str ns " /" (name tag))
763
+ (name tag)))
764
+ (to-json form))))
762
765
763
766
(defn- ->tagged-literal [buffer]
764
767
(tagged-literal (symbol (json/next-string buffer)) (->value buffer)))
Original file line number Diff line number Diff line change 131
131
#?(:clj (UUID/randomUUID )
132
132
:cljr (Guid/NewGuid )
133
133
:cljs (random-uuid ))
134
- (tagged-literal 'tag :value )])
134
+ (tagged-literal 'tag :value )
135
+ (tagged-literal 'ns/tag :value )])
135
136
136
137
(deftest tagged-objects
137
138
(doseq [value tagged]
You can’t perform that action at this time.
0 commit comments