Document json controller, document class and markdown parser