Java Code Examples for org.camunda.spin.json.SpinJsonNode#mapTo()

The following examples show how to use org.camunda.spin.json.SpinJsonNode#mapTo() . 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: SpinApplication.java    From camunda-bpm-spring-boot-starter with Apache License 2.0 5 votes vote down vote up
@Bean
public JavaDelegate spinJava8DeserializerDelegate() {
  return delegateExecution -> {
    SpinJsonNode jsonNode = S("{\"dateTime\": \"2019-12-12T22:22:22\"}");
    Object         key      = jsonNode.mapTo(SpinJava8Dto.class);
    delegateExecution.setVariable("dateTime", key);
  };
}
 
Example 2
Source File: SpinApplication.java    From camunda-bpm-spring-boot-starter with Apache License 2.0 5 votes vote down vote up
@Bean
public JavaDelegate spinJava8DeserializerDelegate() {
  return delegateExecution -> {
    SpinJsonNode jsonNode = S("{\"dateTime\": \"2019-12-12T22:22:22\"}");
    Object         key      = jsonNode.mapTo(SpinJava8Dto.class);
  };
}
 
Example 3
Source File: SpinApplication.java    From camunda-bpm-spring-boot-starter with Apache License 2.0 5 votes vote down vote up
@Bean
public JavaDelegate spinDeserializerDelegate() {
  return delegateExecution -> {
    SpinJsonNode jsonNode = S("{\"dateTime\": \"2019-12-12T22:22:22\"}");
    Object key = jsonNode.mapTo(SpinDto.class);
    delegateExecution.setVariables(Variables.createVariables().putValueTyped("dateTime",
        Variables
         .objectValue(key)
         .serializationDataFormat(DataFormats.JSON_DATAFORMAT_NAME)
         .create()));
  };
}
 
Example 4
Source File: SpinApplication.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@Bean
public JavaDelegate spinJava8DeserializerDelegate() {
  return delegateExecution -> {
    SpinJsonNode jsonNode = S("{\"dateTime\": \"2019-12-12T22:22:22\"}");
    Object         key      = jsonNode.mapTo(SpinJava8Dto.class);
    delegateExecution.setVariable("dateTime", key);
  };
}
 
Example 5
Source File: SpinApplication.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@Bean
public JavaDelegate spinJava8DeserializerDelegate() {
  return delegateExecution -> {
    SpinJsonNode jsonNode = S("{\"dateTime\": \"2019-12-12T22:22:22\"}");
    Object         key      = jsonNode.mapTo(SpinJava8Dto.class);
  };
}
 
Example 6
Source File: SpinApplication.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@Bean
public JavaDelegate spinDeserializerDelegate() {
  return delegateExecution -> {
    SpinJsonNode jsonNode = S("{\"dateTime\": \"2019-12-12T22:22:22\"}");
    Object key = jsonNode.mapTo(SpinDto.class);
    delegateExecution.setVariables(Variables.createVariables().putValueTyped("dateTime",
        Variables
         .objectValue(key)
         .serializationDataFormat(DataFormats.JSON_DATAFORMAT_NAME)
         .create()));
  };
}