using System.Collections.Generic;
using Newtonsoft.Json.Linq;
public static void Main()
var obj = new List<dynamic>()
new Dictionary<string, string>()
{ "Name", "SpecialCollections" },
{ "Seo", "{\"SeoUrl\":\"special-collections\",\"SeoPageTitle\":null,\"SeoKeywords\":null,\"SeoDescription\":null}" }
((Dictionary<string, string>)dict).Select(
kvp => new JProperty(kvp.Key, ToJToken(kvp.Value))
string json = ja.ToString();
private static JToken ToJToken(string s)
return JValue.CreateNull();
if ((s.StartsWith("{") && s.EndsWith("}")) || (s.StartsWith("[") && s.EndsWith("]")))
return JToken.FromObject(s);