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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
setCacheBeanInfo
(boolean cacheBeanInfo) void
setDateFormatter
(String defaultDateFormat) void
setEnumAsBean
(boolean enumAsBean) void
setExcludeProxyProperties
(boolean excludeProxyProperties) void
setIgnoreHierarchy
(boolean ignoreHierarchy) 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:
-
-
Method Details
-
write
- 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
-
setCacheBeanInfo
void setCacheBeanInfo(boolean cacheBeanInfo) -
setExcludeProxyProperties
void setExcludeProxyProperties(boolean excludeProxyProperties)
-