using System.Collections.Generic;
public static void Main()
var parent = new Parent(1);
var child1 = new Child { Parent = parent };
var child2 = new Child { Parent = parent };
parent.Children.Add(child1);
parent.Children.Add(child2);
var data = new List<Child> { child1, child2 };
var settings = new JsonSerializerSettings
PreserveReferencesHandling = PreserveReferencesHandling.Objects
var json = Newtonsoft.Json.JsonConvert.SerializeObject(data, Formatting.Indented, settings);
var data2 = Newtonsoft.Json.JsonConvert.DeserializeObject<IList<Child>>(json, settings);
Console.WriteLine("\nFirst child's parent id is " + data2[0].Parent.Id);
Console.WriteLine("Second child's parent id is " + data2[1].Parent.Id);
public int Id { get; private set; }
public IList<Child> Children { get; set; } = new List<Child>();
public Parent Parent { get; set; }