using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization.Formatters;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
public List<string> url { get; set; }
public class Vulnerability
public int id { get; set; }
public string title { get; set; }
public DateTime created_at { get; set; }
public DateTime updated_at { get; set; }
public object published_date { get; set; }
public References references { get; set; }
public string vuln_type { get; set; }
public string fixed_in { get; set; }
public class ThemeMyLogin
public string latest_version { get; set; }
public DateTime last_updated { get; set; }
public bool popular { get; set; }
public List<Vulnerability> vulnerabilities { get; set; }
public static void Test()
var root = JsonConvert.DeserializeObject<List<Dictionary<string, ThemeMyLogin>>>(json);
var json2 = JsonConvert.SerializeObject(root, Formatting.Indented);
Console.WriteLine(json2);
Assert.IsTrue(JToken.DeepEquals(JToken.Parse(json), JToken.Parse(json2)), "Original and re-serialized JSON are not equivalent!");
Console.WriteLine("\nOriginal and re-serialized JSON are equivalent.");
""latest_version"":""6.4.7"",
""last_updated"":""2017-01-06T18:14:00.000Z"",
""title"":""Theme My Login 6.3.9 - Local File Inclusion"",
""created_at"":""2014-08-01T10:58:35.000Z"",
""updated_at"":""2015-05-15T13:47:24.000Z"",
""url"":[""http://packetstormsecurity.com/files/127302/"",""http://seclists.org/fulldisclosure/2014/Jun/172"",""http://www.securityfocus.com/bid/68254/"",""https://security.dxw.com/advisories/lfi-in-theme-my-login/""]
""latest_version"":""6.4.7"",
""last_updated"":""2017-01-06T18:14:00.000Z"",
""title"":""Theme My Login 6.3.9 - Local File Inclusion"",
""created_at"":""2014-08-01T10:58:35.000Z"",
""updated_at"":""2015-05-15T13:47:24.000Z"",
""url"":[""http://packetstormsecurity.com/files/127302/"",""http://seclists.org/fulldisclosure/2014/Jun/172"",""http://www.securityfocus.com/bid/68254/"",""https://security.dxw.com/advisories/lfi-in-theme-my-login/""]
public static void Main()
Console.WriteLine("Environment version: " + Environment.Version);
Console.WriteLine("Json.NET version: " + typeof(JsonSerializer).Assembly.FullName);
Console.WriteLine("Failed with unhandled exception: ");
public class AssertionFailedException : System.Exception
public AssertionFailedException() : base() { }
public AssertionFailedException(string s) : base(s) { }
public static class Assert
public static void IsTrue(bool value)
public static void IsTrue(bool value, string message)
throw new AssertionFailedException(message ?? "failed");