Integration of batch process to generate json...(not finished)