This sample creates Argon.JObject
and Argon.JArray
instances using the C# collection initializer syntax.
var o = new JObject
{
{"Cpu", "Intel"},
{"Memory", 32},
{
"Drives", new JArray
{
"DVD",
"SSD"
}
}
};
Console.WriteLine(o.ToString());
// {
// "Cpu": "Intel",
// "Memory": 32,
// "Drives": [
// "DVD",
// "SSD"
// ]
// }