change the output format and support json output