@Override public Field getField(String fieldName) { String json = Utilities.getResource(JSON_DIR + fieldName + JSON_POST_FIX); return gson.fromJson(json, Field.class); }
// returns a list of available classes public List<PlayerActor> getAvailableClasses() { String json = Utilities.getResource(CHARACTERS); PlayerActor[] playerActors = gson.fromJson(json, PlayerActor[].class); return Arrays.asList(playerActors); }