Disable explicit nulls for JSON serializer (#7824)

* Disable explicit nulls for JSON serializer

* format to multiple lines
This commit is contained in:
stevenyomi 2022-08-20 23:48:50 +08:00 committed by GitHub
parent 2156844b87
commit 3599d53c61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,7 +77,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) }