Fred Bowker
03/06/2024, 1:41 PM@Singleton
class PostServiceWeb
@Inject
constructor(
properties: AppProperties,
networkJson: Json,
) : ServiceWeb(
to use a Json that has
Json { encodeDefaults = true }
Basically I want to create a default JSON that has this set then it would be injected across the application, or do people change this at the retrofit level, any help would be appreciatedjw
03/06/2024, 1:44 PMJson
instance, find wherever you provide that instance into the dependency graph and replace it with the one you desire.Fred Bowker
03/06/2024, 2:02 PM@Provides
@Singleton
fun providesNetworkJson(): Json = Json {
encodeDefaults = true
}