Skip to content

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

@tzafrirben

Description

@tzafrirben

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions