org.apache.struts2.json

## Interface JSONWriter

- All Known Implementing Classes:
    DefaultJSONWriter

      public interface JSONWriter

  Should serialize an object into JavaScript Object Notation (JSON). If cyclic references are detected they should be nulled out.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `ENUM_AS_BEAN_DEFAULT`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `setCacheBeanInfo(boolean cacheBeanInfo)`
    `void` | `setDateFormatter(String defaultDateFormat)`
    `void` | `setEnumAsBean(boolean enumAsBean)`
    `void` | `setExcludeProxyProperties(boolean excludeProxyProperties)`
    `void` | `setIgnoreHierarchy(boolean ignoreHierarchy)`
    `String` | `write(Object object)`
    `String` | `write(Object object, Collection<Pattern> excludeProperties, Collection<Pattern> includeProperties, boolean excludeNullProperties)`

- - ### Field Detail

    - #### ENUM_AS_BEAN_DEFAULT

          static final boolean ENUM_AS_BEAN_DEFAULT

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### write

          String write(Object object)
                throws JSONException

      Throws:
        `JSONException`

    - #### write

          String write(Object object,
                       Collection<Pattern> excludeProperties,
                       Collection<Pattern> includeProperties,
                       boolean excludeNullProperties)
                throws JSONException

      Throws:
        `JSONException`

    - #### setIgnoreHierarchy

          void setIgnoreHierarchy(boolean ignoreHierarchy)

    - #### setEnumAsBean

          void setEnumAsBean(boolean enumAsBean)

    - #### setDateFormatter

          void setDateFormatter(String defaultDateFormat)

    - #### setCacheBeanInfo

          void setCacheBeanInfo(boolean cacheBeanInfo)

    - #### setExcludeProxyProperties

          void setExcludeProxyProperties(boolean excludeProxyProperties)

Copyright © 2000–2022 Apache Software Foundation. All rights reserved.