js转义问题,并最终转移成string类型的对象,传给后台用
请教大神 怎样把 下面这条数据中 的 "
转义成 "
{"clusterTemplateConfig":{"ray_job_model":"{"args":["--ray.serving.service.name","${serviceName}"],"grayPass":true,"jobName":"${serviceName}-${tenant}-${zoneName}","creator":"yeqing.fyq","domainCode":"fund_schedule","mainClass":"${driverClass}","clusterName":"ray-luoma-stable","jars":["http://rayor.oss-cn-hangzhou-zmf.aliyuncs.com/jar/dev/or-runtime-1.0.0.20201110-shaded.jar"],"inputType":"JAVA","owners":["tengwei.ctw","chengxi.lcx","chuhan.ly","qiaoshuai.qs","fengbin.ffb","yeqing.fyq"],"baseline":1,"config":{"longRunning":true,"env":{},"jvmOptions":["-Dray.jobmaster.metrics.reportIntervalMs=30000","-Dray.jobmaster.metrics.reporter.ceresdb.host=ceresdb-daily.alibaba.net","-Dray.jobmaster.metrics.reporter.ceresdb.port=5000","-Dray.jobmaster.metrics.reporter.ceresdb.tenant=kepler","-Dray.jobmaster.metrics.reporter.ceresdb.subTenant=raychild","-Dray.jobmaster.metrics.reporter.ceresdb.token=c92f9f034b40e0162cefadf70c20cc29","-Dray.jobmaster.metrics.reporter.ceresdb.className=io.ray.metrics.reporter.impl.CeresDBReporter","-Dray.jobmaster.metrics.reporter.logger.className=io.ray.metrics.reporter.impl.LoggerMetricReporter","-Dzmode=true","-Dcom.alipay.ldc.zone=${zoneName}","-Dcom.alipay.confreg.url=confregsession-pool.${zoneName}.alipay.net","-Dzonemng_zone_url=http://zonemng-pool.stable.al...;],"dependencies":{"python":["serving-common-lib"],"java":[]}}}"}}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
可以用文本替换的方式吗
这样不行吗?
在文本中其实可以直接替换的,就是用replace来替换,不过需要注意的是这样替换有可能会有歧义,最好是分解为不产生歧义的部件时才进行替换,防止json解析出问题。