I am currently wanting to page a json result, starting from a function.
I know scrivener_ecto and scrivener_html.
However I am not able to make this pagination.
Can you help me??
below is my files
Controller
def index(conn, _params) do
result_list = listresult()
render(conn, "index.html", result_list: result_list)
end
The result of this function
and a json.
[
%{
e_tag: "\"5bd0dca2b5ba0510f5e39dc6f156ca97\"",
key: "tttgz.txt",
last_modified: "2018-01-03T19:56:56.000Z",
size: "9049",
storage_class: "STANDARD"
},
%{
e_tag: "\"491ac9e6534f501728f48a1d400e174b-31\"",
key: "tttgz2.txt",
last_modified: "2018-01-03T19:57:08.000Z",
size: "253552582",
storage_class: "STANDARD"
},
%{
e_tag: "\"6bc18d8a4f7f56783501ed610dbec22c-91\"",
key: "tttgz3.txt",
last_modified: "2018-01-03T20:04:41.000Z",
size: "756647736",
...
},
%{
e_tag: "\"3c32b2bb5f6a9f1c791b4a1a03b036bc-22\"",
key: "tttgz4.txt",
last_modified: "2018-01-03T20:25:56.000Z",
...
},
%{
e_tag: "\"e560197c5396c82760453258af88756b-451\"",
key: "tttgz5.txt",
last_modified: "2018-01-03T20:30:15.000Z",
...
},
%{
e_tag: "\"15e99185d86395c3cd2a4e38a9e342f8-27\"",
key: "tttgz6.txt",
...
},
%{e_tag: "\"455b1d90c0a1d2c38f842d19f5c77609-36\"", ...},
%{...},
...
]
always when I will access the page using the scrivener
he returns this error to me
protocol Scrivener.Paginater not implemented for [%{e_tag: "\"537f647fa84fd18d1e7ec1bb23e2fb40-1\""
So the question is?
How do I page this json result?