public static void saveArmor(Armor armor) throws IOException {
        try {
            List<Armor> armors = new ArrayList<>();
            armors = getAllArmor();

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

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