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) |
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 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 © 2019. All rights reserved.