只有替换的那种方法,又或者是,换一种方式读取json
dim str as string = "{""type"": ""file"", ""size"": 0}"
msgbox(str)
str = str.replace("""type"":", """tp"":")
Dim data As object
Dim JscriptCode = "function toObject(json) {eval(""var o=""+json);return o;}"
Dim ScriptControl = CreateObject("MSScriptControl.ScriptControl")
With ScriptControl
.Language = "Javascript"
.Timeout = -1
.AddCode(JscriptCode)
data = .Run("toObject", str)
End With
msgbox(data.tp)
http://www.baidu.com/baidu?wd=c%23+json&tn=monline_4_dg