Package io.vertx.core.spi
Interface JsonFactory
-
- All Known Implementing Classes:
JacksonFactory
public interface JsonFactoryA factory for the plug-able json SPI.- Author:
- Julien Viet
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description JsonCodeccodec()static JsonFactoryload()Load the JSON factory with theServiceLoaderAn attempt is made to load a factory using the service loaderMETA-INF/servicesJsonFactory. Factories are sorted If not factory is resolved (which is usually the default case),JacksonFactory.INSTANCEis used.default intorder()The order of the factory.
-
-
-
Method Detail
-
load
static JsonFactory load()
Load the JSON factory with the
ServiceLoader- An attempt is made to load a factory using the service loader
META-INF/servicesJsonFactory. - Factories are sorted
- If not factory is resolved (which is usually the default case),
JacksonFactory.INSTANCEis used.
When the default Jackson codec is used and
jackson-databindis available then a codec using it will be used otherwise the codec will only usejackson-coreand provide best effort mapping. - An attempt is made to load a factory using the service loader
-
order
default int order()
The order of the factory. If there is more than one matching factory they will be tried in ascending order.- Returns:
- the order
-
codec
JsonCodec codec()
-
-