Disable explicit nulls for JSON serializer (#7824)

* Disable explicit nulls for JSON serializer

* format to multiple lines

(cherry picked from commit 3599d53c61dee40e61615dc5424738d2f5779155)
This commit is contained in:
stevenyomi 2022-08-20 23:48:50 +08:00 committed by Jobobby04
parent 3ca2174c65
commit 3eb943055e

View File

@ -91,7 +91,12 @@ class AppModule(val app: Application) : InjektModule {
addSingletonFactory<DatabaseHandler> { AndroidDatabaseHandler(get(), get()) }
addSingletonFactory { Json { ignoreUnknownKeys = true } }
addSingletonFactory {
Json {
ignoreUnknownKeys = true
explicitNulls = false
}
}
addSingletonFactory { PreferencesHelper(app) }