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
[SR-6629] JSONEncoder with convertToSnakeCase encodes myURLProperty into my_url_property, but JSONDecoder with convertFromSnakeCase does not decode myURLProperty from my_url_property. #3752
Comments
Perhaps |
JSONDecoder doesn't have a list of words that are normally written as initials in Swift style, so the camel-ification of |
I'm trying to implement my idea on |
Rather than supporting various notation fluctuations, I would like to prioritize that data encoded with |
Sorry for the delay in responding — I was on vacation. My recommendation for values like this would be to provide a key name of something like |
(In any case, I don't think this is necessarily a bug, just a behavior that exists here because we can't know what the original key was; it's an imperfect conversion.) |
Sorry for delay.
Since used String conversion is |
@norio-nomura I don't currently have the time to read through the full implementation of Yams, but how do you handle custom conversions on decode? The |
I opened a PR that implemented my idea. |
Environment
swift-4.1-DEVELOPMENT-SNAPSHOT-2017-12-15-a
Additional Detail from JIRA
md5: fee6142a597261d7125a4f80b8b8ceb2
Issue Description:
Because
JSONDecoder
covertsmy_url_property
tomyUrlProperty
.The text was updated successfully, but these errors were encountered: