clean ec only for json output