Example usage for com.fasterxml.jackson.databind.jsonschema JsonSchema getSchemaNode

List of usage examples for com.fasterxml.jackson.databind.jsonschema JsonSchema getSchemaNode

Introduction

In this page you can find the example usage for com.fasterxml.jackson.databind.jsonschema JsonSchema getSchemaNode.

Prototype

@JsonValue
public ObjectNode getSchemaNode() 

Source Link

Document

Method for accessing root JSON object of the contained schema.

Usage

From source file:org.jongo.spike.projection.JacksonProjection.java

private ObjectNode getSchemaNode(Class<?> pojoClass) {
    try {/*from   www .j  a  v  a2s .  co  m*/
        JsonSchema schema = mapper.generateJsonSchema(pojoClass);
        return schema.getSchemaNode();
    } catch (Exception e) {
        throw new RuntimeException("Unable to createLazyDBObject field DBObject for class: " + pojoClass, e);
    }
}