export const jsonStr = function (json_data: any) {
  let cache = [] as any;
  const json_str = JSON.stringify(json_data, function (key, value) {
    if (typeof value === 'object' && value !== null) {
      if (cache.indexOf(value) !== -1) {
        return;
      }
      cache.push(value);
    }
    return value;
  });
  cache = null; //释放cache
  return json_str;
};
