I'm unsure how to go about serializing/deserializing an array of objects which implement an interface using Newtonsoft.JSON. Here's a basic example:
public interface IAnimal {
public int NumLegs { get; set; }
//etc..
}
public class Cat : IAnimal {...}
public class Dog : IAnimal {...}
public class Rabbit : IAnimal {...}
public IAnimal[] Animals = new IAnimal[3] {
new Cat(),
new Dog(),
new Rabbit()
}
How would I go about serializing/deserializing the Animals
array?