Fork me on GitHub
Benjamin C17:04:35

@weavejester What is the preferred way to convert keywords from camelCase to kebab when using wrap-json-body in ring/ring-json?


@benjamingramlich However you want. If you search for “String Manipulation” there are a few libraries that provide naming conversions.

Benjamin C17:04:45

are you open to a PR which supports it with a :key-fn option?

Benjamin C17:04:38

something like (wrap-json-body handler {:keywords? true :key-fn ->kebab-case-keyword})?


Support for a :key-fn would be fine. It might be a week until I can get around to merging it though.

Benjamin C17:04:50

okay. thanks. i’ll make a PR soonish.