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

jsonapi_parse should translate key format back again #1612

Closed
maletor opened this issue Mar 22, 2016 · 4 comments
Closed

jsonapi_parse should translate key format back again #1612

maletor opened this issue Mar 22, 2016 · 4 comments

Comments

@maletor
Copy link

maletor commented Mar 22, 2016

Key formats, introduced in #1248, should play into deserializing params as well.

Typically an application will store keys in underscore format. AMS should then convert them to dashed for JSON API. But, upon jsonapi_parse, they should be converted back to underscores. Currently, they are passed as dashed.

@pelted
Copy link

pelted commented Mar 22, 2016

I take it this was new in RC4? My JSON API just broke all over the place with a change in key format from underscores. Not seeing a way to configure key format in the docs and these params passed back are also not deserializing.

@maletor
Copy link
Author

maletor commented Mar 22, 2016

Key formats are new from RC4 on master. The key format defaults are desired and correctly implemented. The reverse part, the deserialization, which is in experimental stage, is not yet implemented correctly. The deserializer should know what the attributes have been transformed to since it knows where they came from.

@maletor
Copy link
Author

maletor commented Mar 22, 2016

I'm interested to know how this would work with the given only and except keys. I imagine they would work as they do today and would use underscored names if we're going with the general use case.

@rthbound
Copy link

@pelted here's the docs on how to configure key format. I use :unaltered because my javascript clients are satisfied with underscored keys. We can't use the default (:dashed) yet because of the issue @snwfog just referenced ^.

I've closed that issue because I think its resolution will be required in order to close this issue.

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

4 participants