Package edu.wisc.game.reflect

## Class JsonReflect

- java.lang.Object
- - edu.wisc.game.reflect.JsonReflect

-     public class JsonReflect
      extends Object

  Tools for exporting Java objects as JSON structures

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `javax.json.JsonObjectBuilder` | `reflectToJSON​(Object o)` | Converts a Java object to a JSON object, to the extent possible
    `static javax.json.JsonObject` | `reflectToJSONObject​(Object o, boolean skipNulls)` | Converts a Java object to a JSON object, to the extent possible
    `static javax.json.JsonObject` | `reflectToJSONObject​(Object o, boolean skipNulls, HashSet<String> excludableNames)` | Converts a Java object to a JSON object, to the extent possible.

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

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

- - ### Method Detail

    - #### reflectToJSON

          public javax.json.JsonObjectBuilder reflectToJSON​(Object o)

      Converts a Java object to a JSON object, to the extent possible

    - #### reflectToJSONObject

          public static javax.json.JsonObject reflectToJSONObject​(Object o,
                                                                  boolean skipNulls)

      Converts a Java object to a JSON object, to the extent possible

    - #### reflectToJSONObject

          public static javax.json.JsonObject reflectToJSONObject​(Object o,
                                                                  boolean skipNulls,
                                                                  HashSet<String> excludableNames)

      Converts a Java object to a JSON object, to the extent possible.
      Parameters:
        `o` - Object to convert
        `skipNulls` - If true, the output won't contain the fields that have null values in o
        `excludableNames` - If not null, contains the set of field names that should be ignored.