feat(router): add type safety to json
& redirect
functions
#9669
+16
−4
json
& redirect
functions
#9669