template, json pagination

Signed-off-by: heinrich.adams@gmail.com <heinrich.adams@gmail.com>