public static GameState read(String saveName) {
    JSONParser parser = new JSONParser();
    try {
      FileReader fileReader = new FileReader(saveName + ".json");
      JSONObject jsonGame = (JSONObject) parser.parse(fileReader);
      JSONObject jsonPlayer = (JSONObject) jsonGame.get("Player");

      JSONArray jsonAttacks;
      JSONArray jsonDefenses;
      Iterator i;

      ArrayList<MeleeWeapon> meleeWeapons = new ArrayList<MeleeWeapon>();
      jsonAttacks = (JSONArray) jsonPlayer.get("melee weapons");
      i = jsonAttacks.iterator();
      while(i.hasNext()) {
        JSONObject jsonAttack = (JSONObject) i.next();
        String stringAttack = utils.toCamelCase((String)jsonAttack.get("name"));

        try {
          Class cls = Class.forName("MakeMeleeWeapon");
          Method makeAtttack = cls.getDeclaredMethod(stringAttack, new Class[]{String.class});
          MakeMeleeWeapon makeMeleeWeapon = new MakeMeleeWeapon();
          meleeWeapons.add((MeleeWeapon)makeAtttack.invoke(makeMeleeWeapon, (String)jsonAttack.get("descriptor")));
        }
        catch(Exception ex){
          ex.printStackTrace();
        }
      }

      ArrayList<RangedWeapon> rangedWeapons = new ArrayList<RangedWeapon>();
      jsonAttacks = (JSONArray) jsonPlayer.get("ranged weapons");
      i = jsonAttacks.iterator();
      while(i.hasNext()) {
        JSONObject jsonAttack = (JSONObject) i.next();
        String stringAttack = utils.toCamelCase((String)jsonAttack.get("name"));

        try {
          Class cls = Class.forName("MakeRangedWeapon");
          Method makeAtttack = cls.getDeclaredMethod(stringAttack, new Class[]{String.class});
          MakeRangedWeapon makeRangedWeapon = new MakeRangedWeapon();
          rangedWeapons.add((RangedWeapon)makeAtttack.invoke(makeRangedWeapon, (String)jsonAttack.get("descriptor")));
        }
        catch(Exception ex){
          ex.printStackTrace();
        }
      }

    ArrayList<Spell> spells = new ArrayList<Spell>();
    jsonAttacks = (JSONArray) jsonPlayer.get("spells");
    i = jsonAttacks.iterator();
    while(i.hasNext()) {
      JSONObject jsonAttack = (JSONObject) i.next();
      String stringAttack = utils.toCamelCase((String)jsonAttack.get("name"));

      try {
        Class cls = Class.forName("MakeSpell");
        Method makeAtttack = cls.getDeclaredMethod(stringAttack, new Class[]{String.class});
        MakeSpell makeSpell = new MakeSpell();
        spells.add((Spell)makeAtttack.invoke(makeSpell, (String)jsonAttack.get("descriptor")));
      }
      catch(Exception ex){
        ex.printStackTrace();
      }
    }

    ArrayList<Armor> armor = new ArrayList<Armor>();
    jsonDefenses = (JSONArray) jsonPlayer.get("armor");
    i = jsonDefenses.iterator();
    while(i.hasNext()) {
      JSONObject jsonDefense = (JSONObject) i.next();
      String stringAttack = utils.toCamelCase((String)jsonDefense.get("name"));

      try {
        Class cls = Class.forName("MakeArmor");
        Method makeAtttack = cls.getDeclaredMethod(stringAttack, new Class[]{String.class});
        MakeArmor makeArmor = new MakeArmor();
        armor.add((Armor)makeAtttack.invoke(makeArmor, (String)jsonDefense.get("descriptor")));
      }
      catch(Exception ex){
        ex.printStackTrace();
      }
    }

    return new GameState((int)(long)jsonGame.get("node"), new Player((String)jsonPlayer.get("class"), (String)jsonPlayer.get("name"), meleeWeapons.toArray(new MeleeWeapon[meleeWeapons.size()]), rangedWeapons.toArray(new RangedWeapon[rangedWeapons.size()]), spells.toArray(new Spell[spells.size()]), armor.toArray(new Armor[armor.size()]), (int)(long)jsonPlayer.get("strength"), (int)(long)jsonPlayer.get("constitution"), (int)(long)jsonPlayer.get("dexterity"), (int)(long)jsonPlayer.get("speed"), (int)(long)jsonPlayer.get("intelligence"), (int)(long)jsonPlayer.get("wizardry"), (int)(long)jsonPlayer.get("luck"), (int)(long)jsonPlayer.get("charisma"), (int)(long)jsonPlayer.get("heal rate"), (int)(long)jsonPlayer.get("gp"), (int)(long)jsonPlayer.get("xp"), (int)(long)jsonPlayer.get("level")));
  }
  catch (Exception e) {
    e.printStackTrace();
  }
  return null;
}