/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { RegisterRobotResponse response = new RegisterRobotResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("fleet", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Fleet = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("robot", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Robot = unmarshaller.Unmarshall(context); continue; } } return(response); }
public static RegisterRobotResponse RegisterRobotRequestCallback(Message message) { try { RegisterRobotResponse response = null; response = JsonTools.UnSerializeFromString <RegisterRobotResponse>(message.GetMessageBuffer()); return(response); } catch (Exception ex) { Debug.Log("RegisterRobotRequestCallback parse error. " + ex.ToString()); return(null); } }