com.sun.grizzly.cometd.util
Class JSONParser.Literal
java.lang.Object
com.sun.grizzly.cometd.util.JSONParser.Literal
- All Implemented Interfaces:
- JSONParser.Generator
- Enclosing class:
- JSONParser
public static class JSONParser.Literal
- extends Object
- implements JSONParser.Generator
A Literal JSON generator
A utility instance of JSON.Generator
that holds a pre-generated string on JSON text.
JSONParser.Literal
public JSONParser.Literal(String json)
- Construct a literal JSON instance for use by
JSON#toString(Object)
.
- Parameters:
json
- A literal JSON string that will be parsed to check validity.
toString
public String toString()
- Overrides:
toString
in class Object
addJSON
public void addJSON(StringBuilder buffer)
- Specified by:
addJSON
in interface JSONParser.Generator
Copyright © 2012 Oracle Corporation. All Rights Reserved.