Is there a way to represent an object array in JSON? e.g. Supposing I have the server-side method Test(object[]) which expects any of the three following classes:
class ObjectA{ int a; }
class ObjectB{ bool a; }
class ObjectC{ string a; }
What would new object[]{ new ObjectA(), new ObjectB(), new ObjectC() } look like when represented in JSON?
I guess it would be:
The only way to preserve the type of object, would be to add an additional property. JSON does not know anything about classes. There are only objects which have certain properties.