automatically add .json suffix to URL

 On branch local
 modified:   endpoint.php