The JSONString interface allows a toJSONString() method so that a class can change the behavior of JSONObject.toString() , JSONArray.toString() , and JSONWriter.value( Object ) . The toJSONString method will be use
| 8 | * of using the Object's <code>toString()</code> method and quoting the result. |
| 9 | */ |
| 10 | public interface JSONString { |
| 11 | /** |
| 12 | * The <code>toJSONString</code> method allows a class to produce its own JSON |
| 13 | * serialization. |
| 14 | * |
| 15 | * @return A strictly syntactically correct JSON text. |
| 16 | */ |
| 17 | public String toJSONString(); |
| 18 | } |