JSONArray jarrayCriteriaQuantity = jsonobject.getJSONObject("achievements").getJSONArray("criteriaQuantity");
JSONArray jarrayCriteriaTimestamp = jsonobject.getJSONObject("achievements").getJSONArray("criteriaTimestamp");
List<Achievement> achievementList = new ArrayList<Achievement>();
for (int i = 0; i < jarrayAchievementsCompleted.length(); i++) {
Achievement achievemenet = new Achievement();
achievemenet.setAid(jarrayAchievementsCompleted.getInt(i));
achievemenet.setTimestamp(jarrayAchievementsCompletedTimestamp.getLong(i));
achievemenet.setCompleted(true);
achievemenet.setCriteriaQuantity(1);
achievementList.add(achievemenet);
}
character.setAchievements(achievementList);
achievementList = new ArrayList<Achievement>();
for (int i = 0; i < jarrayCriteria.length(); i++) {
Achievement achievemenet = new Achievement();
achievemenet.setAid(jarrayCriteria.getInt(i));
achievemenet.setTimestamp(jarrayCriteriaTimestamp.getLong(i));
achievemenet.setCriteriaQuantity(jarrayCriteriaQuantity.getLong(i));
achievemenet.setCompleted(false);
achievementList.add(achievemenet);
}
character.setCriteria(achievementList);
} catch (Exception e) {