Open craigmdennis opened 10 years ago
Yes using paged JSON it is possible but it is not a correct approach. streaming enabled filter.js send request like
yourjsonapiurl?offset=0&limit=100 Next: yourjsonapiurl?offset=100&limit=100 yourjsonapiurl?offset=200&limit=100
So on server side you have to handle this limit and offset and return json data according to it.
I'm using the script with the Wordpress JSON API plugin to generate the data. The API has
currentCount
,totalCount
andpage
properties but I can't seem to use the streaming options from filter.js as it expects the JSON to be in one file.Unfortunately this causes some issues as the JSON output is paged. I can output a single file but this causes performance issues.
So is it possible to add support for paged JSON in streaming?