Common schema and tools for malli
Common schema and tools for malli
(enum-keyword vals)
Creates an :enum
schema which enforces that all of the keywords must be of the same
namespace.
When encoded to JSON, they will be de-namespaced and encoded as strings.
=> (m/encode (wm/enum-keyword [:color/red :color/green]) :color/green (wm/json-transformer)) ;; "green"
Creates an `:enum` schema which enforces that all of the keywords must be of the same namespace. When encoded to JSON, they will be de-namespaced and encoded as strings. => (m/encode (wm/enum-keyword [:color/red :color/green]) :color/green (wm/json-transformer)) ;; "green"
(json-transformer)
JSON transformer which will auotmatically encode / decode namespaced keywords into flatter JSON
JSON transformer which will auotmatically encode / decode namespaced keywords into flatter JSON
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close