(api->clj body)Recursively converts an API response map with snake_case string keys into a Clojure map with kebab-case keyword keys.
Example: (api->clj {"message_id" "abc" "created_at" "2024-01-01"}) ;; => {:message-id "abc" :created-at "2024-01-01"}
Recursively converts an API response map with snake_case string keys into
a Clojure map with kebab-case keyword keys.
Example:
(api->clj {"message_id" "abc" "created_at" "2024-01-01"})
;; => {:message-id "abc" :created-at "2024-01-01"}(clj->api body)Recursively converts a Clojure map with kebab-case keyword keys into a map with snake_case string keys ready for JSON serialisation.
Example: (clj->api {:from "a@b.com" :reply-to ["c@d.com"]}) ;; => {"from" "a@b.com" "reply_to" ["c@d.com"]}
Recursively converts a Clojure map with kebab-case keyword keys into a
map with snake_case string keys ready for JSON serialisation.
Example:
(clj->api {:from "a@b.com" :reply-to ["c@d.com"]})
;; => {"from" "a@b.com" "reply_to" ["c@d.com"]}(remove-nils m)Removes nil-valued entries from a map (non-recursive). Useful before serialising a payload so optional fields are omitted.
Removes nil-valued entries from a map (non-recursive). Useful before serialising a payload so optional fields are omitted.
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 |