preparing list for json output