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:
But I would like to see okayAwesome.
Related: #5
The Plug for incoming parameters is working fine, but I must be missing something to get Phoenix Controller's
jsonto do the translation to camel case.I've followed along with the readme, trying both option for format_encoders:
And have this in a controller:
Output:
But I would like to see
okayAwesome.Related: #5