Refactor the navigation json generation.
Generate the links from the path thus avoiding url serialization.