Save This Page
Home » struts-2.1.8.1-src » org.apache » struts2 » json » [javadoc | source]
org.apache.struts2.json
class: JSONWriter [javadoc | source]
java.lang.Object
   org.apache.struts2.json.JSONWriter

Serializes an object into JavaScript Object Notation (JSON). If cyclic references are detected they will be nulled out.

Field Summary
public static final  boolean ENUM_AS_BEAN_DEFAULT    By default, enums are serialzied as name=value pairs 
static  char[] hex     
Method from org.apache.struts2.json.JSONWriter Summary:
setEnumAsBean,   setIgnoreHierarchy,   write,   write
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts2.json.JSONWriter Detail:
 public  void setEnumAsBean(boolean enumAsBean) 
    If true, an Enum is serialized as a bean with a special property _name=name() as all as all other properties defined within the enum.
    If false, an Enum is serialized as a name=value pair (name=name())
 public  void setIgnoreHierarchy(boolean ignoreHierarchy) 
 public String write(Object object) throws JSONException 
 public String write(Object object,
    Collection<Pattern> excludeProperties,
    Collection<Pattern> includeProperties,
    boolean excludeNullProperties) throws JSONException