com.holonplatform.json.gson.jaxrs

## Class GsonFeature

- java.lang.Object
- - com.holonplatform.json.gson.jaxrs.GsonFeature

- All Implemented Interfaces:
    javax.ws.rs.core.Feature

      public class GsonFeature
      extends Object
      implements javax.ws.rs.core.Feature

  JAX-RS `Feature` to register Gson JSON providers and context resolver.
  Since:
    5.0.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `FEATURE_NAME` Feature name
    `static String` | `JAXRS_DISABLE_GSON_AUTO_CONFIG` Property name to put in JAX-RS application configuration to disable Gson provider (message body reader and writer) and context resolver auto-configuration.
    `static String` | `JAXRS_DISABLE_GSON_CONTEXT_RESOLVER` Property name to put in JAX-RS application configuration to disable Gson context resolver auto-configuration only (message body reader and writer will be auto-configured).
    `static String` | `JAXRS_JSON_PRETTY_PRINT` Property name to put in JAX-RS application configuration to enable JSON pretty print for the JSON message body writer.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GsonFeature()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `configure(javax.ws.rs.core.FeatureContext context)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### JAXRS_DISABLE_GSON_AUTO_CONFIG

          public static final String JAXRS_DISABLE_GSON_AUTO_CONFIG

      Property name to put in JAX-RS application configuration to disable Gson provider (message body reader and writer) and context resolver auto-configuration.
      See Also:
        Constant Field Values

    - #### JAXRS_DISABLE_GSON_CONTEXT_RESOLVER

          public static final String JAXRS_DISABLE_GSON_CONTEXT_RESOLVER

      Property name to put in JAX-RS application configuration to disable Gson context resolver auto-configuration only (message body reader and writer will be auto-configured).
      See Also:
        Constant Field Values

    - #### JAXRS_JSON_PRETTY_PRINT

          public static final String JAXRS_JSON_PRETTY_PRINT

      Property name to put in JAX-RS application configuration to enable JSON pretty print for the JSON message body writer.
      See Also:
        Constant Field Values

    - #### FEATURE_NAME

          public static final String FEATURE_NAME

      Feature name

  - ### Constructor Detail

    - #### GsonFeature

          public GsonFeature()

  - ### Method Detail

    - #### configure

          public boolean configure(javax.ws.rs.core.FeatureContext context)

      Specified by:
        `configure` in interface `javax.ws.rs.core.Feature`

Copyright © 2017 The Holon Platform. All rights reserved.