Menu

Working with JSONLIB

Elvedin Hamzagic

JSONObject jsonObject = new JSONObject(new object[,] {
{ "key1", "value1" }, { "key2", 2 }, { "key3", new JSONObject() }};

jsonObject["key4"] = new JSONArray(new object[] { 1, "two", 3 });

String value1 = jsonObject["key1"];
String two = jsonObject["key1"][1];

((JSONArray)jsonObject["key4"]).RemoveAt(0);

JSONValue jsonValue = JSONValue.Parse(JSONObject.ToString());


Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.