I converted my JSON to a class in C#, with VisualStudio's "Paste JSON as classes" tool, and this was the result:
public class Root
{
public string orderId { get; set; }
public int orderUpdateId { get; set; }
public PositionXYT positionXYT { get; set; }
public class PositionXYT
{
public int x { get; set; }
public int y { get; set; }
public int theta { get; set; }
}
}
The PositionXYT class is being used as an attribute of Root, as you can see, however I can access the PositionXYT class from other classes outside of Root.
Is there a way to encapsulate PositionXYT in a way that only Root can use it, but the positionXYT attribute remains public?