java.lang.Object
io.helidon.media.jsonb.JsonbSupport
- All Implemented Interfaces:
MediaSupport
Support for JSON-B integration.
For usage examples navigate to the
MediaSupport
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic JsonbSupport
create()
Creates a newJsonbSupport
.static JsonbSupport
Creates a newJsonbSupport
.static MessageBodyStreamWriter<Object>
Return a default JSON-B entity event stream writer.static MessageBodyStreamWriter<Object>
eventStreamWriter
(Jsonb jsonb) Create a new JSON-B entity stream writer based onJsonb
instance.Return JSON-B stream writer instance forMediaType.TEXT_EVENT_STREAM
content type.static MessageBodyStreamWriter<Object>
Return a default JSON-B entity event stream writer.static MessageBodyStreamWriter<Object>
ndJsonStreamWriter
(Jsonb jsonb) Create a new JSON-B entity stream writer based onJsonb
instance.Return JSON-B stream writer instance forMediaType.APPLICATION_X_NDJSON
content type.static MessageBodyReader<Object>
reader()
Return a default JSON-B entity reader.static MessageBodyReader<Object>
Create a new JSON-B entity reader based onJsonb
instance.Return JSON-B reader instance.readers()
Returns the collection of the readers which should be registered.static MessageBodyStreamWriter<Object>
Return a default JSON-B entity stream writer.static MessageBodyStreamWriter<Object>
streamWriter
(Jsonb jsonb) Create a new JSON-B entity stream writer based onJsonb
instance.Return JSON-B stream writer instance.Returns the collection of the stream writers which should be registered.static MessageBodyWriter<Object>
writer()
Return a default JSON-B entity writer.static MessageBodyWriter<Object>
Create a new JSON-B entity writer based onJsonb
instance.Return JSON-B writer instance.writers()
Returns the collection of the writers which should be registered.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.helidon.media.common.MediaSupport
register, streamReaders
-
Method Details
-
create
Creates a newJsonbSupport
.- Returns:
- a new
JsonbSupport
-
create
Creates a newJsonbSupport
.- Parameters:
jsonb
- the JSON-B to use; must not benull
- Returns:
- a new
JsonbSupport
- Throws:
NullPointerException
- ifjsonb
isnull
-
reader
Return a default JSON-B entity reader.- Returns:
- default JSON-B body writer instance
-
reader
Create a new JSON-B entity reader based onJsonb
instance.- Parameters:
jsonb
- jsonb instance- Returns:
- new JSON-B body reader instance
-
writer
Return a default JSON-B entity writer.- Returns:
- default JSON-B body writer instance
-
writer
Create a new JSON-B entity writer based onJsonb
instance.- Parameters:
jsonb
- jsonb instance- Returns:
- new JSON-B body writer instance
-
streamWriter
Return a default JSON-B entity stream writer.- Returns:
- default JSON-B body writer stream instance
-
streamWriter
Create a new JSON-B entity stream writer based onJsonb
instance.- Parameters:
jsonb
- jsonb instance- Returns:
- new JSON-B body stream writer instance
-
eventStreamWriter
Return a default JSON-B entity event stream writer. This writer is forMediaType.TEXT_EVENT_STREAM
content type.- Returns:
- new JSON-B body stream writer instance
-
eventStreamWriter
Create a new JSON-B entity stream writer based onJsonb
instance. This writer is forMediaType.TEXT_EVENT_STREAM
content type.- Parameters:
jsonb
- jsonb instance- Returns:
- new JSON-B body stream writer instance
-
ndJsonStreamWriter
Return a default JSON-B entity event stream writer. This writer is forMediaType.APPLICATION_X_NDJSON
content type.- Returns:
- new JSON-B body stream writer instance
-
ndJsonStreamWriter
Create a new JSON-B entity stream writer based onJsonb
instance. This writer is forMediaType.APPLICATION_X_NDJSON
content type.- Parameters:
jsonb
- jsonb instance- Returns:
- new JSON-B body stream writer instance
-
readerInstance
Return JSON-B reader instance.- Returns:
- JSON-B reader instance
-
writerInstance
Return JSON-B writer instance.- Returns:
- JSON-B writer instance
-
streamWriterInstance
Return JSON-B stream writer instance.- Returns:
- JSON-B stream writer instance
-
eventStreamWriterInstance
Return JSON-B stream writer instance forMediaType.TEXT_EVENT_STREAM
content type.- Returns:
- JSON-B event stream writer instance
-
ndJsonStreamWriterInstance
Return JSON-B stream writer instance forMediaType.APPLICATION_X_NDJSON
content type.- Returns:
- JSON-B event stream writer instance
-
readers
Description copied from interface:MediaSupport
Returns the collection of the readers which should be registered.- Specified by:
readers
in interfaceMediaSupport
- Returns:
- readers
-
writers
Description copied from interface:MediaSupport
Returns the collection of the writers which should be registered.- Specified by:
writers
in interfaceMediaSupport
- Returns:
- writers
-
streamWriters
Description copied from interface:MediaSupport
Returns the collection of the stream writers which should be registered.- Specified by:
streamWriters
in interfaceMediaSupport
- Returns:
- stream writers
-