Search code examples
c#web-servicesserializable

Easiest way to send non-serialized objects through webservices c#


Could someone give me recommendations on which would be the easiest way to send objects through webservices (back and forth through the client-side and server-side) on C# without the client-side knowing the definition of the objects to send.


Solution

  • You mentioned you want to send "objects". This implies there is some structure to your data.

    Options:

    1. user2511414 is right, you can just stream bytes.
    2. You can use JSON. All calls can read/write strings and not objects if you are trying to avoid getting locked in to objects.
    3. You can invent your own serialization format and just send data back and forth as strings.