package uulm.teamname.marvelous.gamelibrary.json; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.ObjectCodec; import com.fasterxml.jackson.databind.JsonNode; public class JsonNodeUnwrapper { public static T unwrap(JsonNode subNode, Class type, ObjectCodec codec) throws JsonProcessingException { if (subNode != null) { return codec.treeToValue(subNode, type); } return null; } }