2
假設我有這些JSON字符串:獲取字符串值
string s1 = "{\"foo\":\"wh\"o\"a\"}";
string s2 = "{\"foo\":{\"bar\":123}}";
我想富的字符串格式的價值,所以從S1的我想"wh\"o\"a"
進出S2的我想"{\"bar\":123}"
。但是,如果我這樣做
JsonObject j = JsonObject.Parse(s1);
string foo = j.Get("foo");
富包含S1 "wh"
和"{"
從S2。如何使用JsonObject獲取JSON字段的原始字符串值?