root / org.gvsig.toolbox / trunk / org.gvsig.toolbox / org.gvsig.toolbox.algorithm / src / main / java / org / json / JSONString.java @ 59
History | View | Annotate | Download (690 Bytes)
1 | 59 | nbrodin | package org.json; |
---|---|---|---|
2 | |||
3 | /**
|
||
4 | * The <code>JSONString</code> interface allows a <code>toJSONString()</code> method so that a class can change the behavior
|
||
5 | * of <code>JSONObject.toString()</code>, <code>JSONArray.toString()</code>, and <code>JSONWriter.value(</code>Object<code>)</code>.
|
||
6 | * The <code>toJSONString</code> method will be used instead of the default behavior of using the Object's
|
||
7 | * <code>toString()</code> method and quoting the result.
|
||
8 | */
|
||
9 | public interface JSONString { |
||
10 | /**
|
||
11 | * The <code>toJSONString</code> method allows a class to produce its own JSON serialization.
|
||
12 | *
|
||
13 | * @return A strictly syntactically correct JSON text.
|
||
14 | */
|
||
15 | public String toJSONString(); |
||
16 | } |