private static boolean shouldAddCommaInParentContainer(@NotNull JsonValue item) {
    PsiElement parent = item.getParent();
    if (parent instanceof JsonArray || parent instanceof JsonProperty) {
      PsiElement nextElement = PsiTreeUtil.skipWhitespacesForward(parent instanceof JsonProperty ? parent : item);
      if (nextElement instanceof PsiErrorElement) {
        PsiElement forward = PsiTreeUtil.skipWhitespacesForward(nextElement);
        return parent instanceof JsonProperty ? forward instanceof JsonProperty : forward instanceof JsonValue;
      }
    }
    return false;
  }
private static boolean shouldAddCommaInParentContainer(@NotNull JsonValue item)