I’m wondering if there is a logical way of generating a JSON-string out of any IEnumerable in Monotouch-JSON. I found System.Json-Namespace but it always seems to need a KeyValuePair and I don’t understand how to use this overloads.
To make things clear: I don’t want to convert some WebRequest from JSON to something in .NET. I want the other way like the JsonResult-Conversion in ASP.NET. My favorite would be something like:
var list = new List<string>() { "value1", "value2" };
var result = new System.Json.JsonArray(list);
So that result is something like
["value1","value2"]
It’s not particularly neat, but this works: