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

Feature: Introduce DecodingOptions to allow non-default behavior overrides (e.g. less strict deserialization) #131

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

Rkuro
Copy link

@Rkuro Rkuro commented Dec 21, 2022

Before this PR

If I had an object that looked like this:

{
"foo-bar": "baz"
}

There is no way currently to deserialize this as a conjure object since the naming for conjure is limited to PascalCase and then converted from PascalCase to snake case, i.e. "FooBar" -> "foo_bar" which means that when we hit the decoder case we are silently missing the cases where it is "foo-bar" and I think this should be a capability of the library :)

After this PR

==COMMIT_MSG==
Allow hyphens to be deserialized into conjure objects (non-default)
==COMMIT_MSG==

Possible downsides?

@Rkuro
Copy link
Author

Rkuro commented Dec 21, 2022

changelog bot seems to be having trouble picking up the output of the form ^ - adding no-changelog as a workaround.

@Rkuro Rkuro changed the title Allow hyphens when decoding from json Feature: DecodingOptions to allow non-default behavior overrides (e.g. less strict deserialization) Dec 22, 2022
@Rkuro Rkuro changed the title Feature: DecodingOptions to allow non-default behavior overrides (e.g. less strict deserialization) Feature: Introduce DecodingOptions to allow non-default behavior overrides (e.g. less strict deserialization) Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant