public static void saveWeapon(Weapon weapon) throws IOException {
        try {
            List<Weapon> weapons = new ArrayList<>();
            weapons = getAllWeapon();

            boolean found = false;
            for (int i = 0, end = weapons.size(); i < end; i++) {
                if (weapons.get(i).getName().equals(weapon.getName())) {
                    weapons.set(i, weapon);
                    found = true;
                    break;
                }
            }
            if (!found) {
                weapons.add(weapon);
            }

            writer.writeValue(new File(WEAPON_SAVE_FILE), weapons);
        } catch (IOException ex) {
            Logger.getLogger(JsonDao.class.getName()).log(Level.SEVERE, null, ex);
        }
    }