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

Update/decode maps support #5

Merged
merged 5 commits into from
Jun 28, 2024
Merged

Conversation

kristinakoneva
Copy link
Collaborator

@kristinakoneva kristinakoneva commented Jun 27, 2024

📄 Context

Task

Added support for decoding properties of type Map.

📝 Changes

  • Added logic for decoding a property of type Map inside PrimitiveDeserializerDelegate. If the property is a Map, we extract the map’s key and value types and use them in the MapSerializer.
  • Updated the models in the sample app and tested this on mavenLocal.
  • Added a new proguard rule in Halley’s core module so that all classes which extend from HalResource are preserved. Otherwise, since we use reflection, issues appear after obfuscation on release build variants.

📷 Sample App Demo

Take a closer look at the bottom of the responses and you will see the deserialized favouriteMeals and categorizedAnimals Map properties:

Screen_Recording_20240627_085733_Halley.Sample.1.mp4

Copy link

sonarcloud bot commented Jun 27, 2024

@kristinakoneva
Copy link
Collaborator Author

Reverting the version back to 0.0.5 in libs.versions.toml until we make a new release, so that Lint doesn’t fail because of inability to find the library with v0.0.6 on Maven Central.

Copy link
Collaborator

@terezijaumiljanovic terezijaumiljanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! :clap

@kristinakoneva kristinakoneva merged commit 75fc36f into main Jun 28, 2024
7 checks passed
@kristinakoneva kristinakoneva deleted the update/decode-maps-support branch July 2, 2024 10:06
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 this pull request may close these issues.

3 participants