public class DefaultFormatResolver extends Object implements IJsonFormatTypeResolver
"date-time", "date", "time", maps them to corresponding Java
classes LocalDateTime, LocalDate, and LocalTime. Also handles some non-standard
but commonly used formats such as "full-date" and "utc-millisec".| Constructor and Description |
|---|
DefaultFormatResolver() |
| Modifier and Type | Method and Description |
|---|---|
Object |
coerce(Object value,
Class<?> type) |
Set<String> |
getFormats()
A list of one or more format names such as
"date-time", "date", "time" to be referenced in Json Schema
"format" types. |
JsonFormatType |
resolveType(String format)
Given a JSON Schema
"format" value such as "date-time" provide an JsonFormatType
to correspond with the format. |
Object |
toBindingValue(Object value) |
public Set<String> getFormats()
IJsonFormatTypeResolver"date-time", "date", "time" to be referenced in Json Schema
"format" types.getFormats in interface IJsonFormatTypeResolverpublic JsonFormatType resolveType(String format)
IJsonFormatTypeResolver"format" value such as "date-time" provide an JsonFormatType
to correspond with the format.resolveType in interface IJsonFormatTypeResolverformat - The JSON Schema "format" value such as "date-time".JsonFormatType to correspond with the format or null if unresolved.public Object coerce(Object value, Class<?> type)
coerce in interface ICoercionProviderpublic Object toBindingValue(Object value)
toBindingValue in interface ICoercionProviderCopyright © 2020. All rights reserved.