JS端的: var s = JSON.stringify(str); var ss = s.replace(/\\n/g, "\\n") .replace(/\\'/g, "\\'") .replace(/\\"/g, "\\\"") .replace(/\\&/g, "\\&") .replace(/\\r/g, "\\r") .replace(/\\t/g, &quo
Prefer = {"jim": {"War": 1.9, "the big bang": 1.0, "The lord of wings": 4.0, "Beautiful America": 4.7}, "lily": {"War": 2.0, "Kongfu": 4.1, "The lord of wings": 3.6}