generate api doc to json file so that python can read