Q:

parsing json object with number as its key fields? 

I'm trying to parse json into kotlin objects but the problem is that its key fields are numbers any idea how can parse them , I've tried serialized name but still facing problem. 
The json response looks like this :
{
    "Id": [{
            "1": {
                "name": "name1",
                "class": "11a"
            }
        },
        {
            "2": {
                "name": "name2",
                "class": "11b"
            }
        }
    ]
}

I'm using gson and the main thing i'm trying to do is to store this number fields as some other string objects. 

A:

You can parse them into a list of maps, then "map" those to your data classes instead:
    val input = """{
    "Id": [{
            "1": {
                "name": "name1",
                "class": "11a"
            }
        },
        {
            "2": {
                "name": "name2",
                "class": "11b"
            }
        }
    ]
}"""

    val gson = Gson()
    val parsed: Map<String, List<Map<String, Any>>> = 
        gson.fromJson(input, (object : TypeToken<Map<String, List<Map<String, Any>>>>(){}).type)
    println(parsed["Id"]?.get(0)?.get("1")) // {name=name1, class=11a}

It will have some nasty generic signature, though. 
If you're working with Kotlin, take a look at Klaxon, it will improve your experience.