Have get-ontology-id return a json string

This commit makes the API always returning JSON (except in case of an error, which is something we should fix also actually).