Offset/Limit Pagination or Keyset Pagination for Streaming Large JSON Arrays
Goal: Choose a pagination model to expose in a public API that can stream large JSON arrays without loading the whole document into memory. Constraints: The implementation must keep memory usage low, avoid excessive token‑skipping latency, remain familiar to clients accustomed to SQL‑style offset/limit, and work even when the source JSON lacks a natural sort