public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CompareFacesResponse response = new CompareFacesResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("FaceMatches", targetDepth))
{
var unmarshaller = new ListUnmarshaller<CompareFacesMatch, CompareFacesMatchUnmarshaller>(CompareFacesMatchUnmarshaller.Instance);
response.FaceMatches = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SourceImageFace", targetDepth))
{
var unmarshaller = ComparedSourceImageFaceUnmarshaller.Instance;
response.SourceImageFace = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}