Package org.eclipse.yasson.internal
Class JsonbConfigProperties
- java.lang.Object
-
- org.eclipse.yasson.internal.JsonbConfigProperties
-
public class JsonbConfigProperties extends Object
Resolved properties from JSONB config.- Author:
- Roman Grigoriadi
-
-
Constructor Summary
Constructors Constructor Description JsonbConfigProperties(javax.json.bind.JsonbConfig jsonbConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBinaryDataStrategy()
Checks for binary data strategy to use.JsonbDateFormatter
getConfigDateFormatter()
Gets instantiated shared config date formatter.boolean
getConfigFailOnUnknownProperties()
Gets unknown properties flag fromJsonbConfig
.boolean
getConfigNullable()
Gets nullable fromJsonbConfig
.Locale
getLocale(String locale)
Converts string locale toLocale
.javax.json.bind.config.PropertyNamingStrategy
getPropertyNamingStrategy()
Gets property naming strategy.PropertyOrdering
getPropertyOrdering()
Gets property ordering component.javax.json.bind.config.PropertyVisibilityStrategy
getPropertyVisibilityStrategy()
Gets property visibility strategy.Map<Class<?>,Class<?>>
getUserTypeMapping()
User type mapping for map interface to implementation classes.boolean
isStrictIJson()
If strict IJSON patterns should be used.boolean
isZeroTimeDefaulting()
Makes parsing dates defaulting to zero hour, minute and second.
-
-
-
Method Detail
-
getConfigNullable
public boolean getConfigNullable()
Gets nullable fromJsonbConfig
. If true null values are serialized to json.- Returns:
- Configured nullable
-
getConfigFailOnUnknownProperties
public boolean getConfigFailOnUnknownProperties()
Gets unknown properties flag fromJsonbConfig
. If false,JsonbException
is not thrown for deserialization, when json key cannot be mapped to class property.- Returns:
JsonbException
is risen on unknown property. Default is true even if not set in json config.
-
getBinaryDataStrategy
public String getBinaryDataStrategy()
Checks for binary data strategy to use.- Returns:
- Binary data strategy.
-
getLocale
public Locale getLocale(String locale)
Converts string locale toLocale
.- Parameters:
locale
- Locale to convert.- Returns:
Locale
instance.
-
getPropertyVisibilityStrategy
public javax.json.bind.config.PropertyVisibilityStrategy getPropertyVisibilityStrategy()
Gets property visibility strategy.- Returns:
- Property visibility strategy.
-
getPropertyNamingStrategy
public javax.json.bind.config.PropertyNamingStrategy getPropertyNamingStrategy()
Gets property naming strategy.- Returns:
- Property naming strategy.
-
getConfigDateFormatter
public JsonbDateFormatter getConfigDateFormatter()
Gets instantiated shared config date formatter.- Returns:
- Date formatter.
-
getPropertyOrdering
public PropertyOrdering getPropertyOrdering()
Gets property ordering component.- Returns:
- Component for ordering properties.
-
isStrictIJson
public boolean isStrictIJson()
If strict IJSON patterns should be used.- Returns:
- if IJSON is enabled
-
getUserTypeMapping
public Map<Class<?>,Class<?>> getUserTypeMapping()
User type mapping for map interface to implementation classes.- Returns:
- User type mapping.
-
isZeroTimeDefaulting
public boolean isZeroTimeDefaulting()
Makes parsing dates defaulting to zero hour, minute and second. This will made available to parse patterns like yyyy.MM.dd to
Date
,Calendar
,Instant
LocalDate
or evenZonedDateTime
.If time zone is not set in the pattern than UTC time zone is used. So for example json value 2018.01.01 becomes 2018.01.01 00:00:00 UTC when parsed to instant
Instant
.- Returns:
- true if time should be defaulted to zero.
-
-