Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: allow :key-fn function to convert map keys (feature) #62

Open
tzafrirben opened this issue Mar 16, 2020 · 0 comments
Open

Comments

@tzafrirben
Copy link

Most of the times I use kebab-case keys for maps. In JavaScript, kebab-case is not well supported and t is most common to use camelCase for JSON object keys.

When writing REST API, mainly when the client is not implemented in Clojure, the body JSON object keys are camelCase and it will be nice to be able to convert it to kebab-case when serializing the request.

{"firstName":"John", "lastName":"Doe"} -> {:first-name: "John" :last-name "Doe"}

It will be helpful to provide some kind of key converter function (i.e :key-fn) or provide a JSON serializer function as a dependency.

I hope it makes sense not only to me...

This was referenced Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant