另一個字符串我有一個包含一個文本文件中的follwing查找字符串替換的Java
{"sno":"1c8d1d7eaa32ff3f58a8822111276d5a","at":"app","tt":{"AppParam1":"AppParamValue1","AppParam2":"AppParamValue2"}},"c":{"dt":"Microsoft XDeviceEmulator","pn":"WP","pv":"8.0.9832.0"}
在java中,我想找到「SNO」,「PN」和「光伏發電」並替換值(我的意思是)目前上述文本文件具有
"sno" has value "1c8d1d7eaa32ff3f58a8822111276d5a"
"pn" has value "WP"
"pv" has value "8.0.9832.0"
新值
"sno" has to be changed to "637829"
"pn" has to be changed to "XYZ"
"pv" has to be changed to "2.2.4.0"
你的幫助深表感謝! 謝謝
[你嘗試過什麼? ](http://www.whathaveyoutried.com/)另外 - 你的問題是什麼? –
這看起來像一個JSON。你爲什麼不嘗試一個JSON庫而不是發明它? –