public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { ListTablesResponse response = new ListTablesResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("TableNames", targetDepth)) { var unmarshaller = new ListUnmarshaller<String,StringUnmarshaller>( StringUnmarshaller.GetInstance()); response.TableNames = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastEvaluatedTableName", targetDepth)) { response.LastEvaluatedTableName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } return response; }
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { ListTablesResponse response = new ListTablesResponse(); context.Read(); UnmarshallResult(context,response); return response; }
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { ListTablesResponse response = new ListTablesResponse(); context.Read(); response.ListTablesResult = ListTablesResultUnmarshaller.GetInstance().Unmarshall(context); return response; }
private static void UnmarshallResult(JsonUnmarshallerContext context,ListTablesResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("TableNames", targetDepth)) { context.Read(); response.TableNames = new List<String>(); if (context.CurrentTokenType == JsonToken.Null) { continue; } StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } response.TableNames.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("LastEvaluatedTableName", targetDepth)) { context.Read(); response.LastEvaluatedTableName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return; } } return; }