annotate lib/org.json_2.0/src/org/json/JSONString.java @ 0:db87c1b7eb6d

initial
author dwinter
date Wed, 03 Nov 2010 12:18:46 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
db87c1b7eb6d initial
dwinter
parents:
diff changeset
1 package org.json;
db87c1b7eb6d initial
dwinter
parents:
diff changeset
2 /**
db87c1b7eb6d initial
dwinter
parents:
diff changeset
3 * The <code>JSONString</code> interface allows a <code>toJSONString()</code>
db87c1b7eb6d initial
dwinter
parents:
diff changeset
4 * method so that a class can change the behavior of
db87c1b7eb6d initial
dwinter
parents:
diff changeset
5 * <code>JSONObject.toString()</code>, <code>JSONArray.toString()</code>,
db87c1b7eb6d initial
dwinter
parents:
diff changeset
6 * and <code>JSONWriter.value(</code>Object<code>)</code>. The
db87c1b7eb6d initial
dwinter
parents:
diff changeset
7 * <code>toJSONString</code> method will be used instead of the default behavior
db87c1b7eb6d initial
dwinter
parents:
diff changeset
8 * of using the Object's <code>toString()</code> method and quoting the result.
db87c1b7eb6d initial
dwinter
parents:
diff changeset
9 */
db87c1b7eb6d initial
dwinter
parents:
diff changeset
10 public interface JSONString {
db87c1b7eb6d initial
dwinter
parents:
diff changeset
11 /**
db87c1b7eb6d initial
dwinter
parents:
diff changeset
12 * The <code>toJSONString</code> method allows a class to produce its own JSON
db87c1b7eb6d initial
dwinter
parents:
diff changeset
13 * serialization.
db87c1b7eb6d initial
dwinter
parents:
diff changeset
14 *
db87c1b7eb6d initial
dwinter
parents:
diff changeset
15 * @return A strictly syntactically correct JSON text.
db87c1b7eb6d initial
dwinter
parents:
diff changeset
16 */
db87c1b7eb6d initial
dwinter
parents:
diff changeset
17 public String toJSONString();
db87c1b7eb6d initial
dwinter
parents:
diff changeset
18 }