Posts

Showing posts with the label json-deserialization

Deserializing C++ string in WCF service using Json converter

Deserializing C++ string in WCF service using Json converter I am trying to communicate with C# wcf service which takes josn as an input where json contains image data, i wrote C# client where I am converting the object (InputData) which contains image as byte to json and sending it to server. Client side: InputData RequestData; //copied image data into RequestData obj String jsonRequest = (new JavaScriptSerializer()).Serialize(RequestData); //converting obj to json where : public class InputData { private byte RawImage = null; public byte FrontImage { get return this.FrontRawImage; set if (null != value) { FrontRawImage = value.ToArray(); } } } Server side: //deserialize and get the object InputData requestData = JsonConvert.DeserializeObject<InputData>(jsonData); I am able to do this with C# client but the problem is, I have to communicate this WCF service from C++ client where I am convertin...