-
Notifications
You must be signed in to change notification settings - Fork 66
Replace #as_json
with #to_h
because of wrong object value parsing
#35
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
Conversation
fa76ad2
to
3e1b68a
Compare
@relaxcore this looks good, except for the part with I imagine you're using the Thank you! |
3e1b68a
to
d2709d6
Compare
@stas you're right 😄 |
@relaxcore that's still ActiveSupport 🍯 Let's just leave it without :) |
@stas it won't work in this way just after
BTW, |
@relaxcore consider using |
@stas that's also not a good idea, cause it won't "stringify" nested keys, like |
@relaxcore sorry for the delay. Before we look into technical solutions here, would you be kind to explain a bit what's the use-case here. From my side it's hard to understand how you ended up deserializing a JSONAPI request with a file upload, since it usually requires an |
@stas Everything is pretty simple and as you said. Just have one multipart request and find such behavior |
@relaxcore sorry for the delay here. Please let me know if you're still interested in wrapping this up. It looks like Please let me know what you think. Thanks again for sending the PR. |
Bump. Any updates on this? |
What is the current behavior?
The
Deserialization
module useas_json
to represent input params as JSON. But it change all objects (uploaded files, rails models, etc) to strings. Same as useto_s
on them.Example:
What is the new behavior?
File attributes in deserialized data have the correct type
Checklist
Please make sure the following requirements are complete:
features)