fish2018/pansou · error

listItemsData 数组未闭合

Error message

listItemsData 数组未闭合

What it means

Scanner guard in zlxapp findJSONArrayEnd: the array that starts at the given index is never closed — depth never returns to zero before end-of-body (it also tracks string context so brackets inside strings don't count). Means the JSON payload is truncated mid-array.

Solutions

  1. Retry the fetch for truncated bodies
  2. Check for response size limits cutting the payload
  3. If the site emits legitimately large arrays, fetch with a higher cap
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at plugin/zlxapp/zlxapp.go:234 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of fish2018/pansou@beaa561337 (2026-09-07). Data as JSON: /api/errors/ac990cc020536fd6. Report an issue: GitHub.

Appendix: source

Thrown at plugin/zlxapp/zlxapp.go:234

			if current == '"' {
				inString = false
			}
			continue
		}

		switch current {
		case '"':
			inString = true
		case '[':
			depth++
		case ']':
			depth--
			if depth == 0 {
				return index, nil
			}
		}
	}
	return 0, fmt.Errorf("listItemsData 数组未闭合")
}

func convertItem(item searchItem) (model.SearchResult, bool) {
	title := cleanText(item.Title)
	if title == "" || item.ID <= 0 {
		return model.SearchResult{}, false
	}

	links := make([]model.Link, 0, max(1, len(item.Links)))
	seen := make(map[string]struct{})
	if len(item.Links) == 0 && strings.TrimSpace(item.URL) != "" {
		item.Links = []sourceLink{{
			ID:          item.ID,
			URL:         item.URL,
			Code:        item.Code,
			IsType:      item.IsType,
			SourceTitle: title,
			Status:      1,

View on GitHub (pinned to beaa561337)