Added JSON endpoint.