public static SelfUserProfileJsonUnmarshaller getInstance() { if (instance == null) instance = new SelfUserProfileJsonUnmarshaller(); return instance; } }
public DescribeMyUserProfileResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeMyUserProfileResult describeMyUserProfileResult = new DescribeMyUserProfileResult(); 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 describeMyUserProfileResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("UserProfile", targetDepth)) { context.nextToken(); describeMyUserProfileResult.setUserProfile(SelfUserProfileJsonUnmarshaller.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 describeMyUserProfileResult; }
public DescribeMyUserProfileResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeMyUserProfileResult describeMyUserProfileResult = new DescribeMyUserProfileResult(); 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 describeMyUserProfileResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("UserProfile", targetDepth)) { context.nextToken(); describeMyUserProfileResult.setUserProfile(SelfUserProfileJsonUnmarshaller.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 describeMyUserProfileResult; }
public static SelfUserProfileJsonUnmarshaller getInstance() { if (instance == null) instance = new SelfUserProfileJsonUnmarshaller(); return instance; } }