org.eclipse.jetty.util.ajax
Class JSON.Literal
java.lang.Object
org.eclipse.jetty.util.ajax.JSON.Literal
- All Implemented Interfaces:
- JSON.Generator
- Enclosing class:
- JSON
public static class JSON.Literal
- extends Object
- implements JSON.Generator
A Literal JSON generator A utility instance of JSON.Generator
that holds a pre-generated string on JSON text.
JSON.Literal
public JSON.Literal(String json)
- Construct a literal JSON instance for use by
JSON.toString(Object)
. If Log.isDebugEnabled()
is
true, the JSON will be parsed to check validity
- Parameters:
json
- A literal JSON string.
toString
public String toString()
- Overrides:
toString
in class Object
addJSON
public void addJSON(Appendable buffer)
- Specified by:
addJSON
in interface JSON.Generator
Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.