Initial work on JSON API.
Added support for self-documenting the API.