JSON (cloudera-manager-api-swagger 7.8.1 API)
Date: 2022-11-17

com.cloudera.api.swagger.client

## Class JSON

- java.lang.Object
- - com.cloudera.api.swagger.client.JSON

-     public class JSON
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JSON(ApiClient apiClient)` JSON constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `deserialize(String body, Type returnType)` Deserialize the given JSON string to Java object.
    `com.google.gson.Gson` | `getGson()` Get Gson.
    `String` | `serialize(Object obj)` Serialize the given Java object into JSON string.
    `void` | `setGson(com.google.gson.Gson gson)` Set Gson.

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

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

- - ### Constructor Detail

    - #### JSON

          public JSON(ApiClient apiClient)

      JSON constructor.
      Parameters:
        `apiClient` - An instance of ApiClient

  - ### Method Detail

    - #### getGson

          public com.google.gson.Gson getGson()

      Get Gson.
      Returns:
        Gson

    - #### setGson

          public void setGson(com.google.gson.Gson gson)

      Set Gson.
      Parameters:
        `gson` - Gson

    - #### serialize

          public String serialize(Object obj)

      Serialize the given Java object into JSON string.
      Parameters:
        `obj` - Object
      Returns:
        String representation of the JSON

    - #### deserialize

          public <T> T deserialize(String body,
                                   Type returnType)

      Deserialize the given JSON string to Java object.
      Type Parameters:
        `T` - Type
      Parameters:
        `body` - The JSON string
        `returnType` - The type to deserialize into
      Returns:
        The deserialized Java object

Copyright © 2022. All rights reserved.