Class JsonXContent
java.lang.Object
org.elasticsearch.common.xcontent.json.JsonXContent
- All Implemented Interfaces:
XContent
public class JsonXContent extends java.lang.Object implements XContent
A JSON based content implementation using Jackson.
-
Field Summary
Fields Modifier and Type Field Description static JsonXContentjsonXContent -
Method Summary
Modifier and Type Method Description static XContentBuildercontentBuilder()XContentGeneratorcreateGenerator(java.io.OutputStream os, java.util.Set<java.lang.String> includes, java.util.Set<java.lang.String> excludes)Creates a new generator using the provided output stream and some inclusive and/or exclusive filters.XContentParsercreateParser(NamedXContentRegistry xContentRegistry, DeprecationHandler deprecationHandler, byte[] data)Creates a parser over the provided bytes.XContentParsercreateParser(NamedXContentRegistry xContentRegistry, DeprecationHandler deprecationHandler, byte[] data, int offset, int length)Creates a parser over the provided bytes.XContentParsercreateParser(NamedXContentRegistry xContentRegistry, DeprecationHandler deprecationHandler, java.io.InputStream is)Creates a parser over the provided input stream.XContentParsercreateParser(NamedXContentRegistry xContentRegistry, DeprecationHandler deprecationHandler, java.io.Reader reader)Creates a parser over the provided reader.XContentParsercreateParser(NamedXContentRegistry xContentRegistry, DeprecationHandler deprecationHandler, java.lang.String content)Creates a parser over the provided string content.bytestreamSeparator()XContentTypetype()The type this content handles and produces.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.XContent
createGenerator
-
Field Details
-
jsonXContent
-
-
Method Details
-
contentBuilder
- Throws:
java.io.IOException
-
type
Description copied from interface:XContentThe type this content handles and produces. -
streamSeparator
public byte streamSeparator()- Specified by:
streamSeparatorin interfaceXContent
-
createGenerator
public XContentGenerator createGenerator(java.io.OutputStream os, java.util.Set<java.lang.String> includes, java.util.Set<java.lang.String> excludes) throws java.io.IOExceptionDescription copied from interface:XContentCreates a new generator using the provided output stream and some inclusive and/or exclusive filters. When both exclusive and inclusive filters are provided, the underlying generator will first use exclusion filters to remove fields and then will check the remaining fields against the inclusive filters.- Specified by:
createGeneratorin interfaceXContent- Parameters:
os- the output streamincludes- the inclusive filters: only fields and objects that match the inclusive filters will be written to the output.excludes- the exclusive filters: only fields and objects that don't match the exclusive filters will be written to the output.- Throws:
java.io.IOException
-
createParser
public XContentParser createParser(NamedXContentRegistry xContentRegistry, DeprecationHandler deprecationHandler, java.lang.String content) throws java.io.IOExceptionDescription copied from interface:XContentCreates a parser over the provided string content.- Specified by:
createParserin interfaceXContent- Throws:
java.io.IOException
-
createParser
public XContentParser createParser(NamedXContentRegistry xContentRegistry, DeprecationHandler deprecationHandler, java.io.InputStream is) throws java.io.IOExceptionDescription copied from interface:XContentCreates a parser over the provided input stream.- Specified by:
createParserin interfaceXContent- Throws:
java.io.IOException
-
createParser
public XContentParser createParser(NamedXContentRegistry xContentRegistry, DeprecationHandler deprecationHandler, byte[] data) throws java.io.IOExceptionDescription copied from interface:XContentCreates a parser over the provided bytes.- Specified by:
createParserin interfaceXContent- Throws:
java.io.IOException
-
createParser
public XContentParser createParser(NamedXContentRegistry xContentRegistry, DeprecationHandler deprecationHandler, byte[] data, int offset, int length) throws java.io.IOExceptionDescription copied from interface:XContentCreates a parser over the provided bytes.- Specified by:
createParserin interfaceXContent- Throws:
java.io.IOException
-
createParser
public XContentParser createParser(NamedXContentRegistry xContentRegistry, DeprecationHandler deprecationHandler, java.io.Reader reader) throws java.io.IOExceptionDescription copied from interface:XContentCreates a parser over the provided reader.- Specified by:
createParserin interfaceXContent- Throws:
java.io.IOException
-