Example usage for com.fasterxml.jackson.core.json JsonWriteContext inRoot

List of usage examples for com.fasterxml.jackson.core.json JsonWriteContext inRoot

Introduction

In this page you can find the example usage for com.fasterxml.jackson.core.json JsonWriteContext inRoot.

Prototype

public final boolean inRoot() 

Source Link

Document

Method that returns true if this context is a Root context; that is, content is being read from or written to without enclosing array or object structure.

Usage

From source file:com.bazaarvoice.jackson.rison.RisonGenerator.java

private boolean omitArrayWrappers(JsonWriteContext writeContext) {
    return writeContext.inRoot() && isRisonEnabled(Feature.A_RISON);
}

From source file:com.bazaarvoice.jackson.rison.RisonGenerator.java

private boolean omitObjectWrappers(JsonWriteContext writeContext) {
    return writeContext.inRoot() && isRisonEnabled(Feature.O_RISON);
}