Hi,
I've got a javascript function that passes a JSON object to a method on a .svc endpoint. The object is sends would look like this
obj = { "Name" : name, "Longitude" : longitude, "Latitude" : latitude };
so to use the service I would use
MyApp.Web.PlaceService(obj, successCallback)
as a bare mininum. Problem is that I would sometimes like to pass
obj = { "Name" : name, "Longitude" : longitude, "Latitude" : latitude, "Radius" : radius };
These correspond to two c# types I have (LocationPoint, and LocationPointWithRadius) and, guess what, the radius one derives from the LocationPoint. The problem I'm having is that I really pass
obj = { Place : new Array({ "Name" : name, "Longitude" : longitude, "Latitude" : latitude, "Radius" : radius }...) } (with or without the radius)
I've tried adding the __type attribute to the item in 'Place,' when I want to add a location point with a radius but the serialiser doesn't make sense of it. I have tried adding the known type attributes all over the place but still the deserialiser cant sort it out. Can anyone give me a few pointers, even if it is just some ways to debug as this all seems to be taken care of before my devenv can spot it.
Many thanks,
tortuga