com.amazonaws.transform.JsonUnmarshallerContext Java Examples

The following examples show how to use com.amazonaws.transform.JsonUnmarshallerContext. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ListApplicationsResultJsonUnmarshaller.java    From realworld-serverless-application with Apache License 2.0 6 votes vote down vote up
public ListApplicationsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
  ListApplicationsResult listApplicationsResult = new ListApplicationsResult();

  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 listApplicationsResult;
  }

  while (true) {
    if (token == null)
      break;

    listApplicationsResult.setApplicationList(ApplicationListJsonUnmarshaller.getInstance().unmarshall(context));
    token = context.nextToken();
  }

  return listApplicationsResult;
}
 
Example #2
Source File: CreateApplicationResultJsonUnmarshaller.java    From realworld-serverless-application with Apache License 2.0 6 votes vote down vote up
public CreateApplicationResult unmarshall(JsonUnmarshallerContext context) throws Exception {
  CreateApplicationResult createApplicationResult = new CreateApplicationResult();

  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 createApplicationResult;
  }

  while (true) {
    if (token == null)
      break;

    createApplicationResult.setApplication(ApplicationJsonUnmarshaller.getInstance().unmarshall(context));
    token = context.nextToken();
  }

  return createApplicationResult;
}
 
Example #3
Source File: GetApplicationResultJsonUnmarshaller.java    From realworld-serverless-application with Apache License 2.0 6 votes vote down vote up
public GetApplicationResult unmarshall(JsonUnmarshallerContext context) throws Exception {
  GetApplicationResult getApplicationResult = new GetApplicationResult();

  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 getApplicationResult;
  }

  while (true) {
    if (token == null)
      break;

    getApplicationResult.setApplication(ApplicationJsonUnmarshaller.getInstance().unmarshall(context));
    token = context.nextToken();
  }

  return getApplicationResult;
}
 
Example #4
Source File: UpdateApplicationResultJsonUnmarshaller.java    From realworld-serverless-application with Apache License 2.0 6 votes vote down vote up
public UpdateApplicationResult unmarshall(JsonUnmarshallerContext context) throws Exception {
  UpdateApplicationResult updateApplicationResult = new UpdateApplicationResult();

  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 updateApplicationResult;
  }

  while (true) {
    if (token == null)
      break;

    updateApplicationResult.setApplication(ApplicationJsonUnmarshaller.getInstance().unmarshall(context));
    token = context.nextToken();
  }

  return updateApplicationResult;
}
 
Example #5
Source File: GenericApiGatewayClient.java    From apigateway-generic-java-sdk with Apache License 2.0 5 votes vote down vote up
GenericApiGatewayClient(ClientConfiguration clientConfiguration, String endpoint, Region region,
                        AWSCredentialsProvider credentials, String apiKey, AmazonHttpClient httpClient) {
    super(clientConfiguration);
    setRegion(region);
    setEndpoint(endpoint);
    this.credentials = credentials;
    this.apiKey = apiKey;
    this.signer = new AWS4Signer();
    this.signer.setServiceName(API_GATEWAY_SERVICE_NAME);
    this.signer.setRegionName(region.getName());

    final JsonOperationMetadata metadata = new JsonOperationMetadata().withHasStreamingSuccessResponse(false).withPayloadJson(false);
    final Unmarshaller<GenericApiGatewayResponse, JsonUnmarshallerContext> responseUnmarshaller = in -> new GenericApiGatewayResponse(in.getHttpResponse());
    this.responseHandler = SdkStructuredPlainJsonFactory.SDK_JSON_FACTORY.createResponseHandler(metadata, responseUnmarshaller);
    JsonErrorUnmarshaller defaultErrorUnmarshaller = new JsonErrorUnmarshaller(GenericApiGatewayException.class, null) {
        @Override
        public AmazonServiceException unmarshall(JsonNode jsonContent) throws Exception {
            return new GenericApiGatewayException(jsonContent.toString());
        }
    };
    this.errorResponseHandler = SdkStructuredPlainJsonFactory.SDK_JSON_FACTORY.createErrorResponseHandler(
            Collections.singletonList(defaultErrorUnmarshaller), null);

    if (httpClient != null) {
        super.client = httpClient;
    }
}
 
Example #6
Source File: GenericApiGatewayClient.java    From nifi with Apache License 2.0 5 votes vote down vote up
GenericApiGatewayClient(ClientConfiguration clientConfiguration, String endpoint, Region region,
                        AWSCredentialsProvider credentials, String apiKey, AmazonHttpClient httpClient) {
    super(clientConfiguration);
    setRegion(region);
    setEndpoint(endpoint);
    this.credentials = credentials;
    this.apiKey = apiKey;
    this.signer = new AWS4Signer();
    this.signer.setServiceName(API_GATEWAY_SERVICE_NAME);
    this.signer.setRegionName(region.getName());

    final JsonOperationMetadata metadata = new JsonOperationMetadata().withHasStreamingSuccessResponse(false).withPayloadJson(false);
    final Unmarshaller<GenericApiGatewayResponse, JsonUnmarshallerContext> responseUnmarshaller = in -> new GenericApiGatewayResponse(in.getHttpResponse());
    this.responseHandler = SdkStructuredPlainJsonFactory.SDK_JSON_FACTORY.createResponseHandler(metadata, responseUnmarshaller);
    JsonErrorUnmarshaller defaultErrorUnmarshaller = new JsonErrorUnmarshaller(GenericApiGatewayException.class, null) {
        @Override
        public AmazonServiceException unmarshall(JsonNode jsonContent) throws Exception {
            return new GenericApiGatewayException(jsonContent.toString());
        }
    };
    this.errorResponseHandler = SdkStructuredPlainJsonFactory.SDK_JSON_FACTORY.createErrorResponseHandler(
            Collections.singletonList(defaultErrorUnmarshaller), null);

    if (httpClient != null) {
        super.client = httpClient;
    }
}
 
Example #7
Source File: ListVoicesResultJsonUnmarshaller.java    From ivona-speechcloud-sdk-java with Apache License 2.0 5 votes vote down vote up
public ListVoicesResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListVoicesResult listVoicesResult = new ListVoicesResult();

    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 null;
    }

    while (true) {
        if (token == null) {
            break;
        }

        if (token == FIELD_NAME || token == START_OBJECT) {
            if (context.testExpression(JSON_KEY_VOICES, targetDepth)) {
                listVoicesResult.setVoices(new ListUnmarshaller<Voice>(VoiceJsonUnmarshaller.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 listVoicesResult;
}
 
Example #8
Source File: GetLexiconResultJsonUnmarshaller.java    From ivona-speechcloud-sdk-java with Apache License 2.0 5 votes vote down vote up
public GetLexiconResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GetLexiconResult getLexiconResult = new GetLexiconResult();

    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 null;
    }

    while (true) {
        if (token == null) {
            break;
        }

        if (token == FIELD_NAME || token == START_OBJECT) {
            if (context.testExpression(JSON_KEY_LEXICON, targetDepth)) {
                context.nextToken();
                getLexiconResult.setLexicon(LexiconJsonUnmarshaller.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 getLexiconResult;
}
 
Example #9
Source File: ListLexiconsResultJsonUnmarshaller.java    From ivona-speechcloud-sdk-java with Apache License 2.0 5 votes vote down vote up
public ListLexiconsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListLexiconsResult listLexiconsResult = new ListLexiconsResult();

    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 null;
    }

    while (true) {
        if (token == null) {
            break;
        }

        if (token == FIELD_NAME || token == START_OBJECT) {
            if (context.testExpression(JSON_KEY_LEXICONS, targetDepth)) {
                listLexiconsResult.setLexiconNames(new ListUnmarshaller<String>(
                        SimpleTypeJsonUnmarshallers.StringJsonUnmarshaller.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 listLexiconsResult;
}
 
Example #10
Source File: IvonaSpeechCloudClient.java    From ivona-speechcloud-sdk-java with Apache License 2.0 5 votes vote down vote up
@Override
public ListLexiconsResult listLexicons() {
    ListLexiconsRequest listLexiconsRequest = new ListLexiconsRequest();
    ExecutionContext executionContext = createExecutionContext(listLexiconsRequest);
    ListLexiconsRequestMarshaller marshaller = new ListLexiconsPostRequestMarshaller();
    Request<ListLexiconsRequest> request = marshaller.marshall(listLexiconsRequest);
    Unmarshaller<ListLexiconsResult, JsonUnmarshallerContext> unmarshaller =
            new ListLexiconsResultJsonUnmarshaller();
    JsonResponseHandler<ListLexiconsResult> responseHandler =
            new JsonResponseHandler<ListLexiconsResult>(unmarshaller);

    Response<ListLexiconsResult> response = invoke(request, responseHandler, executionContext);
    return response.getAwsResponse();
}
 
Example #11
Source File: IvonaSpeechCloudClient.java    From ivona-speechcloud-sdk-java with Apache License 2.0 5 votes vote down vote up
@Override
public GetLexiconResult getLexicon(GetLexiconRequest getLexiconRequest)
        throws AmazonServiceException, AmazonClientException {

    ExecutionContext executionContext = createExecutionContext(getLexiconRequest);
    GetLexiconRequestMarshaller marshaller = new GetLexiconPostRequestMarshaller();
    Request<GetLexiconRequest> request = marshaller.marshall(getLexiconRequest);
    Unmarshaller<GetLexiconResult, JsonUnmarshallerContext> unmarshaller = new GetLexiconResultJsonUnmarshaller();
    JsonResponseHandler<GetLexiconResult> responseHandler = new JsonResponseHandler<GetLexiconResult>(unmarshaller);

    Response<GetLexiconResult> response = invoke(request, responseHandler, executionContext);
    return response.getAwsResponse();
}
 
Example #12
Source File: IvonaSpeechCloudClient.java    From ivona-speechcloud-sdk-java with Apache License 2.0 5 votes vote down vote up
@Override
public ListVoicesResult listVoices(ListVoicesRequest listVoicesRequest) throws AmazonServiceException,
        AmazonClientException {

    ExecutionContext executionContext = createExecutionContext(listVoicesRequest);
    Request<ListVoicesRequest> request = ListVoicesRequestMarshallerFactory.getMarshaller(
            listVoicesRequest.getMethodType()).marshall(listVoicesRequest);
    Unmarshaller<ListVoicesResult, JsonUnmarshallerContext> unmarshaller = new ListVoicesResultJsonUnmarshaller();
    JsonResponseHandler<ListVoicesResult> responseHandler =
            new JsonResponseHandler<ListVoicesResult>(unmarshaller);
    Response<ListVoicesResult> response = invoke(request, responseHandler, executionContext);
    return response.getAwsResponse();
}
 
Example #13
Source File: ApplicationListJsonUnmarshaller.java    From realworld-serverless-application with Apache License 2.0 5 votes vote down vote up
public ApplicationList unmarshall(JsonUnmarshallerContext context) throws Exception {
  ApplicationList applicationList = new ApplicationList();

  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 null;
  }

  while (true) {
    if (token == null)
      break;

    if (token == FIELD_NAME || token == START_OBJECT) {
      if (context.testExpression("applications", targetDepth)) {
        context.nextToken();
        applicationList.setApplications(new ListUnmarshaller<ApplicationSummary>(ApplicationSummaryJsonUnmarshaller.getInstance())
                .unmarshall(context));
      }
      if (context.testExpression("nextToken", targetDepth)) {
        context.nextToken();
        applicationList.setNextToken(context.getUnmarshaller(String.class).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 applicationList;
}
 
Example #14
Source File: DeleteApplicationResultJsonUnmarshaller.java    From realworld-serverless-application with Apache License 2.0 4 votes vote down vote up
public DeleteApplicationResult unmarshall(JsonUnmarshallerContext context) throws Exception {
  DeleteApplicationResult deleteApplicationResult = new DeleteApplicationResult();

  return deleteApplicationResult;
}
 
Example #15
Source File: UpdateApplicationInputJsonUnmarshaller.java    From realworld-serverless-application with Apache License 2.0 4 votes vote down vote up
public UpdateApplicationInput unmarshall(JsonUnmarshallerContext context) throws Exception {
  UpdateApplicationInput updateApplicationInput = new UpdateApplicationInput();

  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 null;
  }

  while (true) {
    if (token == null)
      break;

    if (token == FIELD_NAME || token == START_OBJECT) {
      if (context.testExpression("author", targetDepth)) {
        context.nextToken();
        updateApplicationInput.setAuthor(context.getUnmarshaller(String.class).unmarshall(context));
      }
      if (context.testExpression("description", targetDepth)) {
        context.nextToken();
        updateApplicationInput.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
      }
      if (context.testExpression("homePageUrl", targetDepth)) {
        context.nextToken();
        updateApplicationInput.setHomePageUrl(context.getUnmarshaller(String.class).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 updateApplicationInput;
}
 
Example #16
Source File: CreateApplicationInputJsonUnmarshaller.java    From realworld-serverless-application with Apache License 2.0 4 votes vote down vote up
public CreateApplicationInput unmarshall(JsonUnmarshallerContext context) throws Exception {
  CreateApplicationInput createApplicationInput = new CreateApplicationInput();

  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 null;
  }

  while (true) {
    if (token == null)
      break;

    if (token == FIELD_NAME || token == START_OBJECT) {
      if (context.testExpression("applicationId", targetDepth)) {
        context.nextToken();
        createApplicationInput.setApplicationId(context.getUnmarshaller(String.class).unmarshall(context));
      }
      if (context.testExpression("author", targetDepth)) {
        context.nextToken();
        createApplicationInput.setAuthor(context.getUnmarshaller(String.class).unmarshall(context));
      }
      if (context.testExpression("description", targetDepth)) {
        context.nextToken();
        createApplicationInput.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
      }
      if (context.testExpression("homePageUrl", targetDepth)) {
        context.nextToken();
        createApplicationInput.setHomePageUrl(context.getUnmarshaller(String.class).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 createApplicationInput;
}
 
Example #17
Source File: LexiconJsonUnmarshaller.java    From ivona-speechcloud-sdk-java with Apache License 2.0 4 votes vote down vote up
public Lexicon unmarshall(JsonUnmarshallerContext context) throws Exception {
    Lexicon lexicon = new Lexicon();

    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 null;
    }

    while (true) {
        if (token == null) {
            break;
        }

        if (token == FIELD_NAME || token == START_OBJECT) {
            if (context.testExpression(JSON_KEY_NAME, targetDepth)) {
                context.nextToken();
                lexicon.setName(
                        SimpleTypeJsonUnmarshallers.StringJsonUnmarshaller.getInstance().unmarshall(context));
            }
            if (context.testExpression(JSON_KEY_CONTENTS, targetDepth)) {
                context.nextToken();
                lexicon.setContents(
                        SimpleTypeJsonUnmarshallers.StringJsonUnmarshaller.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 lexicon;
}
 
Example #18
Source File: ApplicationSummaryJsonUnmarshaller.java    From realworld-serverless-application with Apache License 2.0 4 votes vote down vote up
public ApplicationSummary unmarshall(JsonUnmarshallerContext context) throws Exception {
  ApplicationSummary applicationSummary = new ApplicationSummary();

  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 null;
  }

  while (true) {
    if (token == null)
      break;

    if (token == FIELD_NAME || token == START_OBJECT) {
      if (context.testExpression("applicationId", targetDepth)) {
        context.nextToken();
        applicationSummary.setApplicationId(context.getUnmarshaller(String.class).unmarshall(context));
      }
      if (context.testExpression("creationTime", targetDepth)) {
        context.nextToken();
        applicationSummary.setCreationTime(context.getUnmarshaller(String.class).unmarshall(context));
      }
      if (context.testExpression("description", targetDepth)) {
        context.nextToken();
        applicationSummary.setDescription(context.getUnmarshaller(String.class).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 applicationSummary;
}
 
Example #19
Source File: VoiceJsonUnmarshaller.java    From ivona-speechcloud-sdk-java with Apache License 2.0 4 votes vote down vote up
public Voice unmarshall(JsonUnmarshallerContext context) throws Exception {

        Voice voice = new Voice();

        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 null;
        }

        while (true) {
            if (token == null) {
                break;
            }

            if (token == FIELD_NAME || token == START_OBJECT) {
                if (context.testExpression(JSON_KEY_NAME, targetDepth)) {
                    context.nextToken();
                    voice.setName(
                            SimpleTypeJsonUnmarshallers.StringJsonUnmarshaller.getInstance().unmarshall(context));
                }
                if (context.testExpression(JSON_KEY_LANGUAGE, targetDepth)) {
                    context.nextToken();
                    voice.setLanguage(
                            SimpleTypeJsonUnmarshallers.StringJsonUnmarshaller.getInstance().unmarshall(context));
                }
                if (context.testExpression(JSON_KEY_GENDER, targetDepth)) {
                    context.nextToken();
                    voice.setGender(
                            SimpleTypeJsonUnmarshallers.StringJsonUnmarshaller.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 voice;
    }
 
Example #20
Source File: ApplicationJsonUnmarshaller.java    From realworld-serverless-application with Apache License 2.0 4 votes vote down vote up
public Application unmarshall(JsonUnmarshallerContext context) throws Exception {
  Application application = new Application();

  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 null;
  }

  while (true) {
    if (token == null)
      break;

    if (token == FIELD_NAME || token == START_OBJECT) {
      if (context.testExpression("applicationId", targetDepth)) {
        context.nextToken();
        application.setApplicationId(context.getUnmarshaller(String.class).unmarshall(context));
      }
      if (context.testExpression("author", targetDepth)) {
        context.nextToken();
        application.setAuthor(context.getUnmarshaller(String.class).unmarshall(context));
      }
      if (context.testExpression("creationTime", targetDepth)) {
        context.nextToken();
        application.setCreationTime(context.getUnmarshaller(String.class).unmarshall(context));
      }
      if (context.testExpression("description", targetDepth)) {
        context.nextToken();
        application.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
      }
      if (context.testExpression("homePageUrl", targetDepth)) {
        context.nextToken();
        application.setHomePageUrl(context.getUnmarshaller(String.class).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 application;
}