Skip to content

Commit

Permalink
Orizaba is default Eiffel protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
z-sztrom committed Oct 14, 2024
1 parent 82f4df1 commit 2b11dc9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<version>2.0.12</version>
</parent>
<properties>
<eiffel-remrem-publish.version>2.1.4</eiffel-remrem-publish.version>
<eiffel-remrem-semantics.version>2.3.0</eiffel-remrem-semantics.version>
<eiffel-remrem-publish.version>2.1.5</eiffel-remrem-publish.version>
<eiffel-remrem-semantics.version>2.4.0</eiffel-remrem-semantics.version>
</properties>
<artifactId>eiffel-remrem-publish</artifactId>
<version>${eiffel-remrem-publish.version}</version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.ObjectCodec;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.cfg.JsonNodeFeature;
import com.fasterxml.jackson.databind.json.JsonMapper;
import com.jayway.jsonpath.Configuration;
import com.jayway.jsonpath.JsonPath;
import com.jayway.jsonpath.spi.json.JacksonJsonNodeJsonProvider;
Expand All @@ -44,19 +48,20 @@ public class EventTemplateHandler {

private static final String REGEXP_END_DIGITS = "\\[\\d+\\]$";

private final Configuration configuration = Configuration.builder()
.jsonProvider(new JacksonJsonNodeJsonProvider())
.mappingProvider(new JacksonMappingProvider())
.build();
private ObjectMapper mapper = JsonMapper.builder()
.disable(JsonNodeFeature.READ_NULL_PROPERTIES)
.build()
.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);
private Configuration configuration = Configuration.builder()
.jsonProvider(new JacksonJsonNodeJsonProvider(mapper))
.mappingProvider(new JacksonMappingProvider(mapper))
.build();

// eventTemplateParser
@JsonInclude(JsonInclude.Include.NON_NULL)
public JsonNode eventTemplateParser(String jsonData , String eventName){
JsonNode updatedJson = null;
JsonFactory factory = new JsonFactory();
ObjectMapper mapper = new ObjectMapper(factory);
mapper.setSerializationInclusion(JsonInclude.Include.NON_ABSENT);
mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);

JsonNode rootNode = null;
try {
String eventTemplate = accessFileInSemanticJar(EVENT_TEMPLATE_PATH + eventName.toLowerCase() + ".json");
Expand Down

0 comments on commit 2b11dc9

Please sign in to comment.