algolia / instantsearch-ios

⚡️ A library of widgets and helpers to build instant-search applications on iOS.
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/ios/
Apache License 2.0
591 stars 55 forks source link

feat(HitsInteractor): ability to set a custom json decoder to hits interactor #254

Closed VladislavFitz closed 1 year ago

VladislavFitz commented 1 year ago

Summary

Currently HitsInteractor supports only the camel case case since it uses the default JSONDecoder constructor, so the client might add CodingKeys per model to support snake case.

Result

HitsInteractor provides jsonDecoder property which can be set in the initialiser or as property, so it's possible to set a custom decoder for hits.

Fix #247