org.mentawai.ajax.renderer
Class JSONObjectAjaxRenderer
java.lang.Object
org.mentawai.ajax.renderer.JSONObjectAjaxRenderer
- All Implemented Interfaces:
- AjaxRenderer
public class JSONObjectAjaxRenderer
- extends Object
- implements AjaxRenderer
A Ajax Render that gets a Java Object and transforms it into a JSON Object.
The render expect an object in the actions output, identified by the key
"object" by default, but you can change it.
- Author:
- Rubem Azenha (rubem.azenha@gmail.com)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSONObjectAjaxRenderer
public JSONObjectAjaxRenderer()
encode
public String encode(Object obj,
Locale loc,
boolean pretty)
throws Exception
- Specified by:
encode in interface AjaxRenderer
- Throws:
Exception
getContentType
public String getContentType()
- Specified by:
getContentType in interface AjaxRenderer
getCharset
public String getCharset()
- Specified by:
getCharset in interface AjaxRenderer
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2012. All Rights Reserved.