Set<String> (@Nullable JsonProperty property) { if (property == null) return Collections.emptySet(); JsonObject object = ObjectUtils.tryCast(property.getParent(), JsonObject.class); if (object == null) return Collections.emptySet(); Set<String> result = new HashSet<>(); for (JsonProperty jsonProperty : object.getPropertyList()) { if (jsonProperty != property) { result.add(jsonProperty.getName()); } } return result; }