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

Android App should Gracefully Handle Extra SDK Parameters #825

Closed
Aatish-Molasi opened this issue Sep 17, 2021 · 1 comment · Fixed by #836
Closed

Android App should Gracefully Handle Extra SDK Parameters #825

Aatish-Molasi opened this issue Sep 17, 2021 · 1 comment · Fixed by #836
Assignees

Comments

@Aatish-Molasi
Copy link
Contributor

Aatish-Molasi commented Sep 17, 2021

Currently the Android app does not handle changes to new parameters added to the SDK. We need to handle any new parameters gracefully.

Analyzing the code it seems that the deserialization of json is handled by the SDK (Transport.kt:customClient(...)).

Possible fix would be to add disable(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES) to JacksonSerializer while setting up the serializer.

install(JsonFeature) {
    serializer = JacksonSerializer() {
        disable(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES)
    }
}
@mistryrakesh
Copy link
Contributor

mistryrakesh commented Sep 17, 2021

I have investigated further into this and setting DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES doesn't seem to resolve this.

Using Gson as JsonFeature does seem to help:

install(JsonFeature) {
    serializer = GsonSerializer()
}

Though, this also introduces some complications which I am still trying to figure out. Once I resolve those I will create a PR for this.

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

Successfully merging a pull request may close this issue.

2 participants