Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
サーバーが私に送信するキーと値の JToken があります。json.net経由で同じことを行うにはどうすればよいですか?
例:
{ "1_type": "sound", "1url": "http://example.com/sound.mp3", "2_type": "url", "2url": "http://example.com", }
Json.Net の使用
JObject jObj = new JObject(); jObj["1_type"] = "sound"; jObj["1url"] = "http://example.com/sound.mp3"; jObj["2_type"] = "url"; jObj["2url"] = "http://example.com"; var jsonString = jObj.ToString();