using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
public string FileName {get; set;}
public long FileSize {get; set;}
public record Item ([property: JsonProperty("rd")] List<Dictionary<string, File>> Rd);
public static void Test()
var root = JsonConvert.DeserializeObject<Dictionary<string, Item>>(json);
var newJson = JsonConvert.SerializeObject(root, Formatting.Indented);
Console.WriteLine("Re-serialized {0}", root);
Console.WriteLine(newJson);
static string GetJson() =>
"a374e91a9f513c79a8961de7c494cf799bbdb35b": {
"filename": "The Lion King (2019) BluRay 1080p x264 (nItRo)-XpoZ.mkv",
"e999ddbb3e18613476546684e34a4a6b0cfec878": {
"filename": "The.Lion.King.2019.1080p.BluRay.10bit.x265-HazMatt.mkv",
"8bb877768a0780c9694767a655720927e6cda57e": {
public static void Main()
Console.WriteLine("Environment version: {0} ({1}), {2}", System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription , Environment.Version, Environment.OSVersion);
Console.WriteLine("{0} version: {1}", typeof(JsonSerializer).Namespace, typeof(JsonSerializer).Assembly.FullName);
Console.WriteLine("Failed with unhandled exception: ");