Feature/json api

wip for now, testing travis integration