make the json-reponse more generic and not only usable for geojson