Skip to content

Usage information for camelCase outgoing parameters #31

Description

@nathany

The Plug for incoming parameters is working fine, but I must be missing something to get Phoenix Controller's json to do the translation to camel case.

I've followed along with the readme, trying both option for format_encoders:

config :phoenix, :json_library, Jason

config :phoenix, :format_encoders, json: ProperCase.JSONEncoder.CamelCase
config :phoenix, :format_encoders, json: MyApp.CustomJSONEncoder

And have this in a controller:

conn
|> json(%{okay_awesome: true})

Output:

{
    "okay_awesome": true
}

But I would like to see okayAwesome.

Related: #5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions