public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetInventoryResponse response = new GetInventoryResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Entities", targetDepth))
{
var unmarshaller = new ListUnmarshaller<InventoryResultEntity, InventoryResultEntityUnmarshaller>(InventoryResultEntityUnmarshaller.Instance);
response.Entities = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("NextToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NextToken = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}