Interface JsonFactory

All Known Implementing Classes:
JacksonFactory

public interface JsonFactory
A factory for the plug-able json SPI.
Author:
Julien Viet
  • Method Summary

    Modifier and Type
    Method
    Description
     
    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.
    default int
    The order of the factory.
  • Method Details

    • 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/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.

    • 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()