Added ToJSON instances for all path types.