将json中的字符串转换为字符串数组

时间:2015-12-13 13:44:08

标签: vb.net json.net

我正在尝试转换json字符串" 1,2"到["1","2"],但我得到了这个" [1,2]":

Dim json = {"types": "1,2"}
oAction.ExtraData = Newtonsoft.Json.JsonConvert.SerializeObject(json)

Dim extraData As JObject
extraData = JObject.Parse(oAction.ExtraData)
extraData("types") = "[" + extraData("types").ToString + "]"

oAction.ExtraData  = Newtonsoft.Json.JsonConvert.SerializeObject(types)

0 个答案:

没有答案