public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetInstanceMetricDataResponse response = new GetInstanceMetricDataResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("metricData", targetDepth))
{
var unmarshaller = new ListUnmarshaller<MetricDatapoint, MetricDatapointUnmarshaller>(MetricDatapointUnmarshaller.Instance);
response.MetricData = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("metricName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.MetricName = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}