001package org.json;
002/**
003 * The <code>JSONString</code> interface allows a <code>toJSONString()</code>
004 * method so that a class can change the behavior of
005 * <code>JSONObject.toString()</code>, <code>JSONArray.toString()</code>,
006 * and <code>JSONWriter.value(</code>Object<code>)</code>. The
007 * <code>toJSONString</code> method will be used instead of the default behavior
008 * of using the Object's <code>toString()</code> method and quoting the result.
009 */
010public interface JSONString {
011    /**
012     * The <code>toJSONString</code> method allows a class to produce its own JSON
013     * serialization.
014     *
015     * @return A strictly syntactically correct JSON text.
016     */
017    public String toJSONString();
018}