Updated router to handle all json needs