org.codehaus.jettison.util
Class StringIndenter

java.lang.Object
  extended by org.codehaus.jettison.util.StringIndenter

public class StringIndenter
extends java.lang.Object

 indent json, assumes the input is not yet indented.  here is an example:
 {
 "FastResponseJs":{
   "ajaxElements":{
     "AjaxMapEntry":[
       {
         "theKey":{
           "@class":"string",
           "$":"ajax1a"
         },
         "theValue":{
           "@class":"AjaxEvent",
           "ajaxSendFormNames":{
             "string":"ajax1"
           },
           "ajaxEventType":"NORMAL",
           "eventName":"onblur",
           "ajaxId":"PRLZY5QZ",
           "screenElementId":"ajax1a",
           "asynchronous":true,
           "disableValidation":true
         }
         
       },
       {
         "theKey":{
        ...
        
        
   Usage: String formatted = new StringIndenter(jsonString).result();
 


Constructor Summary
StringIndenter(java.lang.String theJson)
           
 
Method Summary
 java.lang.String result()
          get the result
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringIndenter

public StringIndenter(java.lang.String theJson)
Parameters:
theJson - is the json to format indenter
Method Detail

result

public java.lang.String result()
get the result

Returns:
the result