private static void UnmarshallResult(JsonUnmarshallerContext context, SimpleObjectInSDKWithoutSupportForNewSubObjectsProperty response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("Property1", targetDepth)) { context.Read(); response.Property1 = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Property2", targetDepth)) { context.Read(); response.Property2 = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return; } } return; }
public SimpleObjectInSDKWithoutSupportForNewSubObjectsProperty Unmarshall(JsonUnmarshallerContext context) { SimpleObjectInSDKWithoutSupportForNewSubObjectsProperty response = new SimpleObjectInSDKWithoutSupportForNewSubObjectsProperty(); context.Read(); UnmarshallResult(context,response); return response; }