More efficient or performant way of serializing permission nodes? - C#