Interface ToXContent
- All Known Subinterfaces:
ToXContentFragment,ToXContentObject
public interface ToXContent
An interface allowing to transfer an object to "XContent" using an
XContentBuilder.
The output may or may not be a value object. Objects implementing ToXContentObject output a valid value
but those that don't may or may not require emitting a startObject and an endObject.-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classToXContent.DelegatingMapParamsstatic classToXContent.MapParamsstatic interfaceToXContent.Params -
Field Summary
Fields Modifier and Type Field Description static ToXContent.ParamsEMPTY_PARAMS -
Method Summary
Modifier and Type Method Description default booleanisFragment()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)
-
Field Details
-
EMPTY_PARAMS
-
-
Method Details
-
toXContent
XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Throws:
java.io.IOException
-
isFragment
default boolean isFragment()
-