Generating json output for modules