PlotSquared/src/main/java/com/intellectualcrafters/json/JSONString.java

17 lines
717 B
Java
Raw Normal View History

package com.intellectualcrafters.json;
2014-11-05 04:42:08 +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.
*/
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.
*
* @return A strictly syntactically correct JSON text.
*/
public String toJSONString();
}