using System.Collections.Generic;
public static void Main()
var parent = new Group("Parent");
var child = new Group("Child");
var json = JsonConvert.SerializeObject(parent, Formatting.Indented);
var deserializedParent = (Group)JsonConvert.DeserializeObject(json, typeof(Group));
Console.WriteLine(deserializedParent == deserializedParent.Children[0].Parent);
var json2 = JsonConvert.SerializeObject(deserializedParent, Formatting.Indented);
Console.WriteLine(json2);
[JsonObject(IsReference = true)]
public string Name { get; set; }
public Group(string name)
Children = new List<Group>();
public IList<Group> Children { get; set; }
public Group Parent { get; set; }
public void AddChild(Group child)