Added a JSON endpoint