request回调函数中requestStream中内容与requestParam是Xml、Json数据格式有关么
byte[] bytes = System.Text.Encoding.UTF8.GetBytes(msg.requestParam),,与requestParam数据类型是xml还是Json有关么。若是采用 JsonTransform.objectToJsonstring转换的requestParam上述代码需要修正吗? --------------------编程问答-------------------- 你的问题能描述清楚点么?你能明确的描述出你的代码的目的是什么吗?
无论xml还是json传输的过程都是字节流,你都需要转换成字符串才能继续解析。 --------------------编程问答-------------------- 将message的requestParam转换为byte写入requestStream中传输信息,而我的requestParam是Json类型的,可以通过byte[] bytes = System.Text.Encoding.UTF8.GetBytes(msg.requestParam),方式转化为byte么 --------------------编程问答-------------------- 你确定你最终需要的是bytes么? --------------------编程问答-------------------- 不是的,要转换,requestStream.Write(bytes, 0, bytes.Length); --------------------编程问答-------------------- 你这样post没问题,关键看服务器要什么
补充:移动开发 , Windows Phone