728x90
반응형
Imports Newtonsoft.Json
Dim Result as String = [JSON_문자열]
Dim tmpJson as JObject = JObject.Parse(Result)
Dim tmp as String = tmpJson([key])
반대로
Dim tmpJson As New JObject()
With tmpJson
.Add("A", A_Value)
.Add("B", B_value)
End With
Dim tmp as String = tmpJson.ToString()
아래와 같은 방법을 활용할 수 있습니다.
Dim json As Object
json = New With {Key .key1 = "value1", .key2 = "value2"}
MsgBox(json.ToString)
Dim json As Object
json = New With {Key .list = {"foo", "bar"}}
MsgBox(JsonConvert.SerializeObject(json))
반응형
댓글