class JsonHelper {

    public <T> T getObjectFromRef(JsonNode rootNode, String ref, Class<T> clazz)
    {
        JsonNode jsonNode = rootNode.at(ref);
        if(jsonNode.isMissingNode()) return null;
        try
        {
            return objectMapper.treeToValue(jsonNode, clazz);
        }
        catch(JsonProcessingException e)
        {
            throw new JsonHelperException(String.format("Failed to map ref %1$s to object %2$s.", ref, clazz.getSimpleName()), e);
        }
    }

    public  JsonHelper();

}