com.gs.dmn.serialization.jackson.ExtensionsDeserializer Maven / Gradle / Ivy
package com.gs.dmn.serialization.jackson;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.ObjectCodec;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.gs.dmn.ast.TDMNElement;
import com.gs.dmn.serialization.xstream.dom.ElementInfo;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
public class ExtensionsDeserializer extends JsonDeserializer {
private final Map> mapper;
public ExtensionsDeserializer(Map> mapper) {
this.mapper = mapper;
}
@Override
public TDMNElement.ExtensionElements deserialize(JsonParser parser, DeserializationContext ctxt) throws IOException {
ObjectCodec codec = parser.getCodec();
JsonNode node = codec.readTree(parser);
JsonNode elementInfoNode = node.get("elementInfo");
ElementInfo elementInfo = codec.treeToValue(elementInfoNode, ElementInfo.class);
JsonNode anyNode = node.get("any");
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy