简体   繁体   中英

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

有人可以给我建议,在客户端不知道要发送的对象的定义的情况下,在 C# 上通过 Web 服务(通过客户端和服务器端来回来回)发送对象的最简单方法是什么。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM