public interface JsonbBuilder
Jsonb
instances based on all
parameters and configuration provided before calling build()
method.
For most use-cases, only one instance of JsonbBuilder is required within the
application.Jsonb
,
ServiceLoader
Modifier and Type | Method and Description |
---|---|
Jsonb |
build()
Returns a new instance of
Jsonb based on the
parameters and configuration specified previously in this builder. |
static Jsonb |
create()
Create a new
Jsonb instance using the default
JsonbBuilder implementation provided as returned from
JsonbProvider.provider() method. |
static Jsonb |
create(JsonbConfig config)
Create a new
Jsonb instance using the default
JsonbBuilder implementation provided as returned from
JsonbProvider.provider() method, configured
with provided configuration. |
static JsonbBuilder |
newBuilder()
Create a new
JsonbBuilder instance as returned by the default
JsonbProvider.provider() method. |
static JsonbBuilder |
newBuilder(JsonbProvider provider)
Create a new
JsonbBuilder instance as returned by
provider#create call. |
static JsonbBuilder |
newBuilder(String providerName)
Create a new
JsonbBuilder instance as returned by
JsonbProvider.provider(String)
method. |
JsonbBuilder |
withConfig(JsonbConfig config)
Set configuration which will be set to the newly created
Jsonb instance. |
JsonbBuilder |
withProvider(JsonProvider jsonpProvider)
|
JsonbBuilder withConfig(JsonbConfig config)
Jsonb
instance.config
- Configuration for Jsonb
instance.JsonbBuilder
instance.JsonbBuilder withProvider(JsonProvider jsonpProvider)
jsonpProvider
- JsonProvider
instance
to be used by Jsonb to lookup JSON-P implementation.JsonbBuilder
instance.Jsonb build()
Jsonb
based on the
parameters and configuration specified previously in this builder.Jsonb
class.
Always a non-null valid object.JsonbException
- If an error was encountered while
creating the Jsonb instance, such as (but not limited to) no JSON
Binding provider found, or classes provide conflicting annotations.IllegalArgumentException
- If there's an error processing the set
parameters, such as the non-null parameter is assigned null value, or
unrecognized property is set in
JsonbConfig
.static Jsonb create()
Jsonb
instance using the default
JsonbBuilder
implementation provided as returned from
JsonbProvider.provider()
method.Jsonb
instance.static Jsonb create(JsonbConfig config)
Jsonb
instance using the default
JsonbBuilder
implementation provided as returned from
JsonbProvider.provider()
method, configured
with provided configuration.static JsonbBuilder newBuilder()
JsonbBuilder
instance as returned by the default
JsonbProvider.provider()
method.JsonbBuilder
instance.static JsonbBuilder newBuilder(String providerName)
JsonbBuilder
instance as returned by
JsonbProvider.provider(String)
method.providerName
- Provider class name to be looked up by ServiceLoader
.JsonbBuilder
instance.static JsonbBuilder newBuilder(JsonbProvider provider)
JsonbBuilder
instance as returned by
provider#create
call.provider
- JsonProvider
instance
used for creating JsonBuilder instances
.JsonbBuilder
instance.Copyright © 2019 JBoss by Red Hat. All rights reserved.