@Override
  public TreeElement @NotNull [] getChildren() {
    JsonElement value = null;
    if (myElement instanceof JsonFile) {
      value = ((JsonFile)myElement).getTopLevelValue();
    }
    else if (myElement instanceof JsonProperty) {
      value = ((JsonProperty)myElement).getValue();
    }
    else if (PsiTreeUtil.instanceOf(myElement, JsonObject.class, JsonArray.class)) {
      value = myElement;
    }
    if (value instanceof JsonObject object) {
      return ContainerUtil.map2Array(object.getPropertyList(), TreeElement.class, property -> new JsonStructureViewElement(property));
    }
    else if (value instanceof JsonArray array) {
      final List<TreeElement> childObjects = ContainerUtil.mapNotNull(array.getValueList(), value1 -> {
        if (value1 instanceof JsonObject && !((JsonObject)value1).getPropertyList().isEmpty()) {
          return new JsonStructureViewElement(value1);
        }
        else if (value1 instanceof JsonArray && PsiTreeUtil.findChildOfType(value1, JsonProperty.class) != null) {
          return new JsonStructureViewElement(value1);
        }
        return null;
      });
      return childObjects.toArray(TreeElement.EMPTY_ARRAY);
    }
    return EMPTY_ARRAY;
  }
@Override
  public TreeElement @NotNull [] getChildren()