All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fasterxml.jackson.core.TreeCodec Maven / Gradle / Ivy

Go to download

This artifact provides a single jar that contains all classes required to use remote Jakarta Enterprise Beans and Jakarta Messaging, including all dependencies. It is intended for use by those not using maven, maven users should just import the Jakarta Enterprise Beans and Jakarta Messaging BOM's instead (shaded JAR's cause lots of problems with maven, as it is very easy to inadvertently end up with different versions on classes on the class path).

There is a newer version: 35.0.0.Beta1
Show newest version
package com.fasterxml.jackson.core;

import java.io.IOException;

/**
 * Interface that defines objects that can read and write
 * {@link TreeNode} instances using Streaming API.
 * 
 * @since 2.3
 */
public abstract class TreeCodec
{
    public abstract  T readTree(JsonParser p) throws IOException, JsonProcessingException;
    public abstract void writeTree(JsonGenerator g, TreeNode tree) throws IOException, JsonProcessingException;

    /**
     * @return Node that represents "missing" node during traversal: something
     *   referenced but that does not exist in content model
     * 
     * @since 2.10
     */
    public TreeNode missingNode() {
        return null;
    }

    /**
     * @return Node that represents explict {@code null} value in content
     * 
     * @since 2.10
     */
    public TreeNode nullNode() {
        return null;
    }

    public abstract TreeNode createArrayNode();
    public abstract TreeNode createObjectNode();
    public abstract JsonParser treeAsTokens(TreeNode node);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy