because in the data returned by the backend, the outermost basic field key may be uppercase or lowercase, for example:
{
"data":{
"relaData":{
"ahahah":"hahahah",
"heihei":"heihei"
}
},
"status":1,
"message":""
}
sometimes it starts with an uppercase Key
{
"Data":{
"relaData":{
"ahahah":"hahahah",
"heihei":"heihei"
}
},
"Status":1,
"Message":""
}
data cannot be parsed when Retrofit uses GsonConverterFactory
. What I want to do is to define a Converter to change the string in the request body to uppercase or lowercase before parsing it into an object after GsonConverterFactory
. Then come to GSON parsing, how to do it?