Adding in json endpoint