私はjson文字列を持っています
変換してこの文字列を取得しました
var json = org.cometd.JSON.toJSON(envelope.messages);
"[{\"version\": \"1.0\", \"minimumVersion\": \"0.9\", \"channel\": \"/meta/handshake\", \"supportedConnectionTypes\": [\"long-polling\", \"callback-polling\"], \"advice\": {\"timeout\": 60000, \"interval\": 0}, \"id\": \"1\"}]"
そして、いくつかのシンボルを置き換える必要があります。そのような出力が必要です
[{"version":"1.0","minimumVersion":"0.9","channel":"/meta/handshake","supportedConnectionTypes":["long-polling","callback-polling"],"advice":{"timeout":60000,"interval":0},"id":"1"}]
置き換えられる記号は \\
with""
および "[
with[
および ]"
withであることを意味します]
可能であれば私を助けてください。