【发布时间】:2018-02-06 02:21:23
【问题描述】:
我使用 powerbuilder ole 对象像 JSON 一样对字符串进行编码/解码,但是当我使用 ole 对象时,我不知道如何将我的数据进行编码
这是我的测试数据: 我的测试数据是这样的 [{"ref":"T213445677","pickdtime":"2018-02-02 09:00:00","compname":"Wing Kei Shoes Company"}]
这是我的代码
OleObject wsh
Integer li_rc
string ls_temp
wsh = CREATE OleObject
li_rc = wsh.ConnectToNewObject( "MSScriptControl.ScriptControl" )
wsh.language = "javascript"
ls_temp = wsh.Eval("escape('[{"ref":"T213445677","pickdtime":"2018-02-02
09:00:00","compname":"Wing Kei Shoes Company"}]')")
MessageBox( "ESCAPE" , ls_temp)
ls_temp = wsh.Eval("unescape('" + ls_temp + "')")
MessageBox( "UNESCAPE" , ls_temp)
【问题讨论】:
标签: json powerbuilder