MjMxaJefVwupJGQe static method

String MjMxaJefVwupJGQe(
  1. Object obj
)

字典转json

Implementation

static String MjMxaJefVwupJGQe(Object obj) {
  var jsonStr = json.encode(obj).replaceAll("\"{", "{").replaceAll("}\"", "}");
  var containsBR = jsonStr.contains("\\n");
  var containsTab = jsonStr.contains("\\t");
  var containsUnicode = jsonStr.contains("\\u");
  if (containsBR) jsonStr = jsonStr.replaceAll("\\n", vJElJkFtVELbULoe);
  if (containsTab) jsonStr = jsonStr.replaceAll("\\t", hHHeRfgeHsIHsrtm);
  if (containsUnicode) jsonStr = jsonStr.replaceAll("\\u", mCddjeSeYZKKhwyU);
  jsonStr = jsonStr.replaceAll("\\", "");
  if (containsBR) jsonStr = jsonStr.replaceAll(vJElJkFtVELbULoe, "\\n");
  if (containsTab) jsonStr = jsonStr.replaceAll(hHHeRfgeHsIHsrtm, "\\t");
  if (containsUnicode) jsonStr = jsonStr.replaceAll(mCddjeSeYZKKhwyU, "\\u");
  return jsonStr;
}