Q:

NewtonSoft JSON within strings serialization

Given a list of JSON strings is it possible to convert the List to JSON without the serializer thinking that the JSON strings are plain old strings. Using NewtonSoft .NET
Using:
List<string> list = { "{"foo": "bar"}", "[ 1, 2, 3]", "{"biz": "baz", "fiz": ["a", "b", "c"]}";
String json = JsonConvert.SerializeObject(list, Formatting.Indented);

at the current moment I get something like this from json:
"[ \n\r "{"foo": "bar"}", \n\r  "[ 1, 2, 3]", ...]"

The serializer treats the json strings like any other strings that have special formatting.
I would like something more like this:
"[ 
    {
        "foo": "bar"
    },
    [
         1,
         2,
         3
    ], 
    {
         "biz": "baz", 
         "fiz": [
                    "a", 
                    "b", 
                    "c"
                ]
    }
]"

something like that with proper indentation.

A:

The idea here is to build the JSON yourself using the Json.NET API instead of writing it by hand. For this, you could use JToken to store your original json strings and then wrap the result inside a JArray. You can then use the ToString method to serialize everything back to JSON when you are done.
var finalString = new JArray(list.Select(JToken.Parse).ToArray()).ToString();

