• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Jackson JSON-processor.
2  *
3  * Copyright (c) 2007- Tatu Saloranta, tatu.saloranta@iki.fi
4  */
5 
6 package com.fasterxml.jackson.core;
7 
8 /**
9  * Simple tag interface used to mark schema objects that are used by some
10  * {@link JsonParser} and {@link JsonGenerator} implementations to further
11  * specify structure of expected format.
12  * Basic JSON-based parsers and generators do not use schemas, but some data
13  * formats (like many binary data formats like Thrift, protobuf) mandate
14  * use of schemas.
15  *<p>
16  * Since there is little commonality between schemas for different data formats,
17  * this interface does not define much meaningful functionality for accessing
18  * schema details; rather, specific parser and generator implementations need
19  * to cast to schema implementations they use. This marker interface is mostly
20  * used for tagging "some kind of schema" -- instead of passing opaque
21  * {@link java.lang.Object} -- for documentation purposes.
22  */
23 public interface FormatSchema
24 {
25     /**
26      * Method that can be used to get an identifier that can be used for diagnostics
27      * purposes, to indicate what kind of data format this schema is used for: typically
28      * it is a short name of format itself, but it can also contain additional information
29      * in cases where data format supports multiple types of schemas.
30      */
getSchemaType()31     String getSchemaType();
32 }
33