com.holonplatform.json.gson.jaxrs.internal

## Class GsonContextResolver

- java.lang.Object
- - com.holonplatform.json.gson.jaxrs.internal.GsonContextResolver

- All Implemented Interfaces:
    javax.ws.rs.ext.ContextResolver<com.google.gson.Gson>

      @Produces(value="application/json")
      public class GsonContextResolver
      extends Object
      implements javax.ws.rs.ext.ContextResolver<com.google.gson.Gson>

  JAX-RS `ContextResolver` to replace default `GsonBuilder` for Gson marshalling using a builder with `PropertyBox` handling capabilities.
  Since:
    5.0.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GsonContextResolver(boolean prettyPrint)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.google.gson.Gson` | `getContext(Class<?> type)`

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

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

- - ### Constructor Detail

    - #### GsonContextResolver

          public GsonContextResolver(boolean prettyPrint)

      Constructor
      Parameters:
        `prettyPrint` - `true` to enable pretty printing for serialized JSON

  - ### Method Detail

    - #### getContext

          public com.google.gson.Gson getContext(Class<?> type)

      Specified by:
        `getContext` in interface `javax.ws.rs.ext.ContextResolver<com.google.gson.Gson>`

Copyright © 2019 The Holon Platform. All rights reserved.