1

I need to deserialize an object of the class that could represent one of its fields as a j-object (like "some_field":{"foo":"bar"}) or an array of j-objects (like "some_field:"[{"foo":"bar"}, {"foo":"baz"}]). How can I achieve such behavior via JSON.NET?

public class SomeInfo
{
    public String foo { get; set; }
}

public class PositionInfo
{
    public SomeInfo some_field { get; set; }
}

Thanks in advance.

FrozenHeart
  • 19,844
  • 33
  • 126
  • 242
  • possible duplicate of [How to handle both a single item and an array for the same property using JSON.net](http://stackoverflow.com/questions/18994685/how-to-handle-both-a-single-item-and-an-array-for-the-same-property-using-json-n) – Brian Rogers Aug 07 '14 at 13:33

0 Answers0