Package 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
  Description
  `static final boolean`
  `ENUM_AS_BEAN_DEFAULT`

- ## Method Summary

  Modifier and Type
  Method
  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 Details

  - ### ENUM_AS_BEAN_DEFAULT

    static final boolean ENUM_AS_BEAN_DEFAULT
    See Also:
      - Constant Field Values

- ## Method Details

  - ### 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)