java.lang.Object
org.eclipse.yasson.internal.JsonbConfigProperties
Resolved properties from JSONB config.
-
Constructor Summary
ConstructorsConstructorDescriptionJsonbConfigProperties(jakarta.json.bind.JsonbConfig jsonbConfig) Creates new resolved JSONB config. -
Method Summary
Modifier and TypeMethodDescriptionChecks for binary data strategy to use.Gets instantiated shared config date formatter.booleanGets unknown properties flag fromJsonbConfig.booleanGets nullable fromJsonbConfig.Class<?>DefaultMapimplementation to use, based on order strategy.Converts string locale toLocale.jakarta.json.bind.serializer.JsonbSerializer<Object>jakarta.json.bind.config.PropertyNamingStrategyGets property naming strategy.Gets property ordering component.jakarta.json.bind.config.PropertyVisibilityStrategyGets property visibility strategy.User type mapping for map interface to implementation classes.booleanbooleanbooleanWhether the MapToEntriesArraySerializer is selected when a null key is detected in a map.booleanIf strict IJSON patterns should be used.booleanMakes parsing dates defaulting to zero hour, minute and second.
-
Constructor Details
-
JsonbConfigProperties
public JsonbConfigProperties(jakarta.json.bind.JsonbConfig jsonbConfig) Creates new resolved JSONB config.- Parameters:
jsonbConfig- jsonb config
-
-
Method Details
-
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,JsonbExceptionis not thrown for deserialization, when json key cannot be mapped to class property.- Returns:
JsonbExceptionis risen on unknown property. Default is true even if not set in json config.
-
getBinaryDataStrategy
Checks for binary data strategy to use.- Returns:
- Binary data strategy.
-
getLocale
Converts string locale toLocale.- Parameters:
locale- Locale to convert.- Returns:
Localeinstance.
-
getPropertyVisibilityStrategy
public jakarta.json.bind.config.PropertyVisibilityStrategy getPropertyVisibilityStrategy()Gets property visibility strategy.- Returns:
- Property visibility strategy.
-
getPropertyNamingStrategy
public jakarta.json.bind.config.PropertyNamingStrategy getPropertyNamingStrategy()Gets property naming strategy.- Returns:
- Property naming strategy.
-
getConfigDateFormatter
Gets instantiated shared config date formatter.- Returns:
- Date formatter.
-
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
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,InstantLocalDateor 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.
-
getDefaultMapImplType
DefaultMapimplementation to use, based on order strategy.- Returns:
- map impl type
-
getNullSerializer
-
hasRequiredCreatorParameters
public boolean hasRequiredCreatorParameters() -
getEagerInitClasses
-
isForceMapArraySerializerForNullKeys
public boolean isForceMapArraySerializerForNullKeys()Whether the MapToEntriesArraySerializer is selected when a null key is detected in a map.- Returns:
- false or true
-
isDateInMillisecondsAsString
public boolean isDateInMillisecondsAsString()
-