prime31 / Nez

Nez is a free 2D focused framework that works with MonoGame and FNA
MIT License
1.78k stars 362 forks source link

TypeNameHandling.Auto works now for object fields #723

Closed thatpixelguy closed 2 years ago

thatpixelguy commented 2 years ago

Fix for this issue:

class Shape { 
  int x; 
  int y; 
}

class Rectangle { 
  int width; 
  int height; 
}

class ThingToSerialize 
{
  // JsonEncoder currently serializes this as a Shape when using TypeNameHandling.Auto
  Shape MyShape = new Rectangle(); 
}