public static ChapInfoJsonUnmarshaller getInstance() { if (instance == null) instance = new ChapInfoJsonUnmarshaller(); return instance; } }
public DescribeChapCredentialsResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeChapCredentialsResult describeChapCredentialsResult = new DescribeChapCredentialsResult(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return describeChapCredentialsResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("ChapCredentials", targetDepth)) { context.nextToken(); describeChapCredentialsResult .setChapCredentials(new ListUnmarshaller<ChapInfo>(ChapInfoJsonUnmarshaller.getInstance()).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return describeChapCredentialsResult; }