public class BigNumberFormatResolver extends Object implements IJsonFormatTypeResolver
"big-integer" and "big-decimal" formats. Maps them to corresponding Java
classes BigInteger and BigDecimal. Note these are non-standard JSON Schema
formats, but they fill a void where an API must use "big" numbers instead of "integer"
or "number".| Constructor and Description |
|---|
BigNumberFormatResolver() |
| 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.