laravel-jsonapi icon indicating copy to clipboard operation
laravel-jsonapi copied to clipboard

Option to receive and send json keys as camelCase

Open ghost opened this issue 9 years ago • 1 comments

Laravel best practice seems to be to use snake_case for column names which is how the json keys are in turn generated out of Laravel when I hit the endpoint from browser, however somewhere in between the endpoint and browser these underscores seem to be converted to spaces which makes accessing the key hard.

Is it possible to convert the field names to camelCase on the way out and then back to snake_case on the way back in?

ghost avatar Jan 03 '16 07:01 ghost

This is definitely possible. However, I will not be able to look for a solution myself as I don't have the time currently.

You're very welcome to do a pull request!

egeriis avatar Jan 03 '16 11:01 egeriis