Package org.eclipse.yasson.internal
Class JsonbConfigProperties
- java.lang.Object
-
- org.eclipse.yasson.internal.JsonbConfigProperties
-
public class JsonbConfigProperties extends java.lang.ObjectResolved properties from JSONB config.
-
-
Constructor Summary
Constructors Constructor Description JsonbConfigProperties(javax.json.bind.JsonbConfig jsonbConfig)Creates new resolved JSONB config.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBinaryDataStrategy()Checks for binary data strategy to use.JsonbDateFormattergetConfigDateFormatter()Gets instantiated shared config date formatter.booleangetConfigFailOnUnknownProperties()Gets unknown properties flag fromJsonbConfig.booleangetConfigNullable()Gets nullable fromJsonbConfig.java.lang.Class<?>getDefaultMapImplType()DefaultMapimplementation to use, based on order strategy.java.util.Set<java.lang.Class<?>>getEagerInitClasses()java.util.LocalegetLocale(java.lang.String locale)Converts string locale toLocale.javax.json.bind.serializer.JsonbSerializer<java.lang.Object>getNullSerializer()javax.json.bind.config.PropertyNamingStrategygetPropertyNamingStrategy()Gets property naming strategy.PropertyOrderinggetPropertyOrdering()Gets property ordering component.javax.json.bind.config.PropertyVisibilityStrategygetPropertyVisibilityStrategy()Gets property visibility strategy.java.util.Map<java.lang.Class<?>,java.lang.Class<?>>getUserTypeMapping()User type mapping for map interface to implementation classes.booleanisStrictIJson()If strict IJSON patterns should be used.booleanisZeroTimeDefaulting()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,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
public java.lang.String getBinaryDataStrategy()
Checks for binary data strategy to use.- Returns:
- Binary data strategy.
-
getLocale
public java.util.Locale getLocale(java.lang.String locale)
Converts string locale toLocale.- Parameters:
locale- Locale to convert.- Returns:
Localeinstance.
-
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 java.util.Map<java.lang.Class<?>,java.lang.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,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
public java.lang.Class<?> getDefaultMapImplType()
DefaultMapimplementation to use, based on order strategy.- Returns:
- map impl type
-
getNullSerializer
public javax.json.bind.serializer.JsonbSerializer<java.lang.Object> getNullSerializer()
-
getEagerInitClasses
public java.util.Set<java.lang.Class<?>> getEagerInitClasses()
-
-