Package org.codehaus.jackson

Examples of org.codehaus.jackson.JsonNode


    /**
     * Use {@link #isString(String)} to check if string (it is not possible to check if a character, however).
     */
    public Character getChar(final String path) {
        final JsonNode node = getNode(path);
        return getChar(path, node);
    }
View Full Code Here


    /**
     * Use {@link #isInt(String)} to check first, if required.
     */
    public Integer getInt(final String path) {
        final JsonNode node = getNode(path);
        return getInt(path, node);
    }
View Full Code Here

                this.rawClassConstructor = rawClassConstructor;
            }

            @Override
            public JsonRepresentation deserialize(final JsonParser jp, final DeserializationContext ctxt) throws IOException, JsonProcessingException {
                final JsonNode jsonNode = jsonNodeDeser.deserialize(jp, ctxt);
                try {
                    return (JsonRepresentation) rawClassConstructor.newInstance(jsonNode);
                } catch (final Exception e) {
                    throw new IllegalStateException(e);
                }
View Full Code Here

    /**
     * Use {@link #isLong(String)} to check first, if required.
     */
    public Long getLong(final String path) {
        final JsonNode node = getNode(path);
        return getLong(path, node);
    }
View Full Code Here

    /**
     * Use {@link #isNumber(String)} to test if number (it is not possible to check if a float, however).
     */
    public Float getFloat(final String path) {
        final JsonNode node = getNode(path);
        return getFloat(path, node);
    }
View Full Code Here

    private static class JsonRepresentationSerializer extends JsonSerializer<Object> {
        @Override
        public void serialize(final Object value, final JsonGenerator jgen, final SerializerProvider provider) throws IOException, JsonProcessingException {
            final JsonRepresentation jsonRepresentation = (JsonRepresentation) value;
            final JsonNode jsonNode = jsonRepresentation.asJsonNode();
            jgen.writeTree(jsonNode);
        }
View Full Code Here

    /**
     * Use {@link #isDouble(String)} to check first, if required.
     */
    public Double getDouble(final String path) {
        final JsonNode node = getNode(path);
        return getDouble(path, node);
    }
View Full Code Here

    /**
     * Use {@link #isBigInteger(String)} to check first, if required.
     */
    public BigInteger getBigInteger(final String path) {
        final JsonNode node = getNode(path);
        return getBigInteger(path, node);
    }
View Full Code Here

    /**
     * Use {@link #isBigDecimal(String)} to check first, if required.
     */
    public BigDecimal getBigDecimal(final String path) {
        final JsonNode node = getNode(path);
        return getBigDecimal(path, node);
    }
View Full Code Here

    }
    /**
     * Use {@link #isBigDecimal(String)} to check first, if required.
     */
    public BigDecimal getBigDecimalFromNumeric(final String path) {
        final JsonNode node = getNode(path);
        return getBigDecimalFromNumeric(path, node);
    }
View Full Code Here

TOP

Related Classes of org.codehaus.jackson.JsonNode

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.