Package com.fasterxml.jackson.core

Examples of com.fasterxml.jackson.core.JsonLocation


        return rootMessage;
    }

    public static JsonLocation fromConfigValue(ConfigValue configValue) {
        ConfigOrigin configOrigin = configValue.origin();
        return new JsonLocation(configValue, -1, configOrigin.lineNumber(), -1);
    }
View Full Code Here


        this.fieldDefaults = src.fieldDefaults;
    }

    @Override
    public Object deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
        JsonLocation currentLocation = jp.getTokenLocation();
        JsonToken t = jp.getCurrentToken();
        try {
            if (t == JsonToken.START_OBJECT) {
                ObjectNode objectNode = jp.readValueAsTree();
                handleDefaultsAndRequiredAndNull(ctxt, objectNode);
View Full Code Here

            }
        }
        String classField = pluginMap.classField();
        JsonToken currentToken = jp.getCurrentToken();
        // can use this to approximate error location if a sub-method throws an exception
        JsonLocation currentLocation = jp.getTokenLocation();
        JsonNode jsonNode = jp.readValueAsTree();
        ObjectCodec objectCodec = jp.getCodec();

        try {
            Object bean = null;
View Full Code Here

        ConfigValue current = currentConfig();
        if (current == null) {
            return JsonLocation.NA;
        }
        ConfigOrigin nodeOrigin = current.origin();
        return new JsonLocation(current, -1, nodeOrigin.lineNumber(), -1);
    }
View Full Code Here

        return new CodecBeanDeserializer((BeanDeserializerBase) newDelegatee, fieldDefaults);
    }

    @Override
    public Object deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
        JsonLocation currentLocation = jp.getTokenLocation();
        JsonToken t = jp.getCurrentToken();
        try {
            if (t == JsonToken.START_OBJECT) {
                ObjectNode objectNode = jp.readValueAsTree();
                handleDefaultsAndRequiredAndNull(ctxt, objectNode);
View Full Code Here

            }
        }
        String classField = pluginMap.classField();
        JsonToken currentToken = jp.getCurrentToken();
        // can use this to approximate error location if a sub-method throws an exception
        JsonLocation currentLocation = jp.getTokenLocation();
        JsonNode jsonNode = jp.readValueAsTree();
        ObjectCodec objectCodec = jp.getCodec();

        try {
            Object bean = null;
View Full Code Here

    public static boolean isRealLocation(JsonLocation jsonLocation) {
        return (jsonLocation != null) && (jsonLocation != JsonLocation.NA);
    }

    public static JsonMappingException maybeImproveLocation(JsonLocation wrapLoc, JsonMappingException cause) {
        JsonLocation exLoc = cause.getLocation();
        if (isRealLocation(wrapLoc) && !isRealLocation(exLoc)) {
            if (wrapLoc.getSourceRef() instanceof ConfigValue) {
                ConfigValue locRef = (ConfigValue) wrapLoc.getSourceRef();
                List<JsonMappingException.Reference> paths = cause.getPath();
                for (JsonMappingException.Reference path : paths) {
View Full Code Here

        return rootMessage;
    }

    public static JsonLocation fromConfigValue(ConfigValue configValue) {
        ConfigOrigin configOrigin = configValue.origin();
        return new JsonLocation(configValue, -1, configOrigin.lineNumber(), -1);
    }
View Full Code Here

    public static boolean isRealLocation(JsonLocation jsonLocation) {
        return (jsonLocation != null) && (jsonLocation != JsonLocation.NA);
    }

    public static JsonMappingException maybeImproveLocation(JsonLocation wrapLoc, JsonMappingException cause) {
        JsonLocation exLoc = cause.getLocation();
        if (isRealLocation(wrapLoc) && !isRealLocation(exLoc)) {
            if (wrapLoc.getSourceRef() instanceof ConfigValue) {
                ConfigValue locRef = (ConfigValue) wrapLoc.getSourceRef();
                List<JsonMappingException.Reference> paths = cause.getPath();
                for (JsonMappingException.Reference path : paths) {
View Full Code Here

        return rootMessage;
    }

    public static JsonLocation fromConfigValue(ConfigValue configValue) {
        ConfigOrigin configOrigin = configValue.origin();
        return new JsonLocation(configValue, -1, configOrigin.lineNumber(), -1);
    }
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.core.JsonLocation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.