Package 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 ofJSON.Generatorthat holds a pre-generated string on JSON text.
-
-
Constructor Summary
Constructors Constructor Description Literal(String json)Construct a literal JSON instance for use byJSON.toString(Object).
-
-
-
Constructor Detail
-
Literal
public Literal(String json)
Construct a literal JSON instance for use byJSON.toString(Object). IfLogger.isDebugEnabled()is true, the JSON will be parsed to check validity- Parameters:
json- A literal JSON string.
-
-
Method Detail
-
addJSON
public void addJSON(Appendable buffer)
- Specified by:
addJSONin interfaceJSON.Generator
-
-