Example usage for com.fasterxml.jackson.core JsonStreamContext getParent

List of usage examples for com.fasterxml.jackson.core JsonStreamContext getParent

Introduction

In this page you can find the example usage for com.fasterxml.jackson.core JsonStreamContext getParent.

Prototype

public abstract JsonStreamContext getParent();

Source Link

Document

Accessor for finding parent context of this context; will return null for root context.

Usage

From source file:de.javagl.jgltf.model.io.JsonError.java

/**
 * Create a collection consisting of stream contexts, starting at the root
 * node and ending at the given stream context
 *  //from ww w.  ja  va 2  s  .  co m
 * @param streamContext The stream context
 * @return The collection
 */
private static Collection<JsonStreamContext> expand(JsonStreamContext streamContext) {
    Deque<JsonStreamContext> collection = new LinkedList<JsonStreamContext>();
    JsonStreamContext current = streamContext;
    while (current != null) {
        collection.addFirst(current);
        current = current.getParent();
    }
    return collection;
}

From source file:com.proofpoint.event.collector.FilteringMapSerializer.java

private boolean isRootThisContextsParent(JsonStreamContext outputContext) {
    return outputContext.getParent().getCurrentName() == null;
}