You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.
Kaustubh Patange edited this page Aug 23, 2021
·
2 revisions
Using TypeConverters is not just limited to Room. Since they generate methods from converting to & from JSON, they can be used for many other purposes eg: Manual OkHttp get call, Jetpack Datastore (for storing complex objects in typed preference as string), etc.
As there is need to add an annotation @TypeConverter when generating converter (which exist in androidx.room package) you need an explicit dependency on Room to use the converter for other general purpose. This is reductant as it will pull all the room classes & annotations along with the dependency which you might not need (in a non Room project).
In such case you can add this no-op room dependency.