Top Description Methods
io.vertx.core.spi

public Interface JsonFactory

Known Direct Implementers
io.vertx.core.json.jackson.JacksonFactory
Imports
io.vertx.core.json.Json, io.vertx.core.json.jackson.JacksonFactory, io.vertx.core.spi.json.JsonCodec

A factory for the plug-able json SPI.
Author
Julien Viet

Method Summary

Modifier and TypeMethod and Description
public JsonCodec
public static JsonFactory
load()

Load the JSON factory with the ServiceLoader

  • An attempt is made to load a factory using the service loader META-INF/services JsonFactory.
  • Factories are sorted
  • If not factory is resolved (which is usually the default case), JacksonFactory#INSTANCE is used.
public default int

Returns:

the order
order
()

The order of the factory.

Method Detail

codecback to summary
public JsonCodec codec()
loadback to summary
public static JsonFactory load()

Load the JSON factory with the ServiceLoader

  • An attempt is made to load a factory using the service loader META-INF/services JsonFactory.
  • Factories are sorted
  • If not factory is resolved (which is usually the default case), JacksonFactory#INSTANCE is used.

When the default Jackson codec is used and jackson-databind is available then a codec using it will be used otherwise the codec will only use jackson-core and provide best effort mapping.

orderback to summary
public default int order()

The order of the factory. If there is more than one matching factory they will be tried in ascending order.

Implementation Specification

returns Integer#MAX_VALUE

Returns:int

the order