2014-10-27 20:05:01 +01:00
|
|
|
package com.intellectualcrafters.json;
|
2014-11-05 04:42:08 +01:00
|
|
|
|
2014-10-27 20:05:01 +01:00
|
|
|
/**
|
2014-12-18 03:15:11 +01:00
|
|
|
* The <code>JSONString</code> interface allows a <code>toJSONString()</code> method so that a class can change the
|
|
|
|
* behavior of <code>JSONObject.toString()</code>, <code>JSONArray.toString()</code>, and
|
|
|
|
* <code>JSONWriter.value(</code>Object<code>)</code>. The <code>toJSONString</code> method will be used instead of the
|
|
|
|
* default behavior of using the Object's <code>toString()</code> method and quoting the result.
|
2014-10-27 20:05:01 +01:00
|
|
|
*/
|
|
|
|
public interface JSONString {
|
|
|
|
/**
|
2014-12-18 03:15:11 +01:00
|
|
|
* The <code>toJSONString</code> method allows a class to produce its own JSON serialization.
|
2014-10-27 20:05:01 +01:00
|
|
|
*
|
|
|
|
* @return A strictly syntactically correct JSON text.
|
|
|
|
*/
|
|
|
|
public String toJSONString();
|
|
|
|
}
|