Interface IJsonFormatTypeCoercer

  • All Superinterfaces:
    manifold.ext.rt.api.ICoercionProvider
    All Known Implementing Classes:
    BigNumberCoercer, BinaryCoercer, DefaultCoercer

    public interface IJsonFormatTypeCoercer
    extends manifold.ext.rt.api.ICoercionProvider
    Implement this interface as a service provider. Provide a mapping from a JSON Schema "format" to a Java type. For instance,

    the "date-time" format maps to LocalDateTime

    See DefaultCoercer to see how "date-time" and other formats are mapped to a set of Java types.

    Register one or more of your IJsonFormatTypeCoercer implementations in a file named:

    META-INF/services/manifold.ext.rt.api.ICoercionProvider
    This file contains the fully qualified names of your implementations, one per line e.g.,
     com.example.FooFormatTypeCoercer
     com.example.BarFormatTypeCoercer
     
    • Field Detail

      • _coercionProviders

        static final manifold.util.concurrent.LocklessLazyVar<Set<manifold.ext.rt.api.ICoercionProvider>> _coercionProviders
    • Method Detail

      • getFormats

        Map<String,​Class<?>> getFormats()
        Returns:
        Pairs of one or more format names to Java type such as "date-time"->LocalDateTime.class to be referenced in Json Schema "format" types.