java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.JsonProviderFeature
All Implemented Interfaces:
javax.ws.rs.core.Feature

public class JsonProviderFeature extends Object implements javax.ws.rs.core.Feature
A JAX-RS Feature that registers custom MOXy JSON providers for handling serialization and deserialization of JSON with or without root elements.

This feature disables MOXy's automatic provider discovery to ensure that the custom providers IncludeRootJSONProvider and ExcludeRootJSONProvider are used explicitly with defined priorities.

Configuration details:

See Also:
  • Constructor Details

    • JsonProviderFeature

      public JsonProviderFeature()
      Do not use default constructor.
  • Method Details

    • configure

      public boolean configure(javax.ws.rs.core.FeatureContext context)
      Configures the feature by registering the custom JSON providers.
      Specified by:
      configure in interface javax.ws.rs.core.Feature
      Parameters:
      context - the FeatureContext provided by the JAX-RS runtime
      Returns:
      true to indicate that the feature was successfully configured