You can try below code to convert the data to JSON:
try {
JSONObject jsonObject = new JSONObject("{\"level\":[{\"id\":\"1\",\"name\":\"first\",\"time\":\"00:02:00\"},{\"id\":\"2\",\"name\":\"second\",\"time\":\"00:03:00\"},{\"id\":\"3\",\"name\":\"math\",\"time\":\"00:03:00\"}, {\"id\":\"4\",\"name\":\"language \",\"time\":\"00:03:00\"},{\"id\":\"5\",\"name\":\"sport\",\"time\":\"00:04:00\"}]}");
JSONArray level = jsonObject.getJSONArray("level");
for (int i = 0; i < level.length(); i++) {
JSONObject data = level.getJSONObject(i);
String id = data.getString("id");
String name = data.getString("name");
String time = data.getString("time");
Log.d("JSONDATA--->", "Data at: " + i + " " + id + ":" + name + ":" + time);
}
} catch (JSONException e) {
e.printStackTrace();
}