Object (final String s) { if (s.length() >= 2 && s.startsWith("\"") && s.endsWith("\"")) { return StringUtil.unescapeStringCharacters(s.substring(1, s.length() - 1)); } try { return Integer.valueOf(s); } catch (NumberFormatException ignored) {} return s; }