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 builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |