How to parse json with different responces

Viewed 55

the following are both different responses. My question is how to parse or decode this JSON response in Android using a retrofit. I am very confused about how to get proper output. The user will get a response in Hindi if the device language is Hindi.

{
"data": [
    {
        "c_id": "2",
        "ca_id": "5",
        "c_name_hi": "गूगल",
        "cat_name_hi": "अनुवाद करना"
    }]
}



{
"data": [
    {
        "c_id": "2",
        "ca_id": "5",
        "c_name_en": "Google",
        "cat_name_en": "to translate"
    }]
}
0 Answers
Related