@Deprecated
public class JSONRenderer
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
JSONRenderer.Options
Deprecated.
Rendering options
|
Constructor and Description |
---|
JSONRenderer()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
doubleToString(double d)
Deprecated.
Produce a string from a double.
|
java.lang.String |
join(JSONArray ja,
java.lang.String separator)
Deprecated.
Make a string from the contents of this JSONArray.
|
java.lang.String |
numberToString(java.lang.Number n)
Deprecated.
Produce a string from a Number.
|
JSONRenderer.Options |
options()
Deprecated.
Return an Options object with default values
|
java.lang.String |
prettyPrint(JSONArray ja,
JSONRenderer.Options opt)
Deprecated.
Pretty-print a JSONArray
|
java.lang.String |
prettyPrint(JSONObject jo,
JSONRenderer.Options opt)
Deprecated.
Make a prettyprinted JSON text of this JSONObject.
|
java.lang.String |
quote(java.lang.String string)
Deprecated.
Quote the supplied string for JSON
|
void |
quote(java.io.Writer w,
java.lang.String string)
Deprecated.
Quote the supplied string for JSON, to the supplied Writer
|
void |
testNumberValidity(java.lang.Object o)
Deprecated.
Throw an exception if the object is an NaN or infinite number.
|
java.lang.String |
toString(JSONArray ja)
Deprecated.
Make a JSON text of the supplied JSONArray.
|
java.lang.String |
toString(JSONObject jo)
Deprecated.
Render the supplied JSONObject to a String, in
the simplest possible way.
|
java.lang.String |
valueToString(java.lang.Object value)
Deprecated.
Make a JSON text of an Object value.
|
java.lang.String |
valueToString(java.lang.Object value,
JSONRenderer.Options opt)
Deprecated.
Make a JSON String of an Object value, with rendering options
|
java.io.Writer |
write(java.io.Writer writer,
JSONArray ja)
Deprecated.
Write the contents of the supplied JSONArray as JSON text to a writer.
|
java.io.Writer |
write(java.io.Writer writer,
JSONObject jo)
Deprecated.
Write the contents of the supplied JSONObject as JSON text to a writer.
|
public JSONRenderer.Options options()
public java.lang.String toString(JSONObject jo)
public java.lang.String toString(JSONArray ja)
Warning: This method assumes that the data structure is acyclical.
public java.lang.String quote(java.lang.String string)
public void quote(java.io.Writer w, java.lang.String string) throws java.io.IOException
java.io.IOException
public java.lang.String valueToString(java.lang.Object value) throws JSONException
Warning: This method assumes that the data structure is acyclical.
value
- The value to be serialized.{
(left brace) and ending
with }
(right brace).JSONException
- If the value is or contains an invalid number.public java.lang.String valueToString(java.lang.Object value, JSONRenderer.Options opt) throws JSONException
Warning: This method assumes that the data structure is acyclical.
value
- The value to be serialized.{
(left brace) and ending
with }
(right brace).JSONException
- If the object contains an invalid number.public java.lang.String numberToString(java.lang.Number n) throws JSONException
n
- A NumberJSONException
- If n is a non-finite number.public java.lang.String prettyPrint(JSONObject jo, JSONRenderer.Options opt) throws JSONException
Warning: This method assumes that the data structure is acyclical.
{
(left brace) and ending
with }
(right brace).JSONException
- If the object contains an invalid number.public java.lang.String prettyPrint(JSONArray ja, JSONRenderer.Options opt) throws JSONException
JSONException
public void testNumberValidity(java.lang.Object o) throws JSONException
o
- The object to test.JSONException
- If o is a non-finite number.public java.lang.String join(JSONArray ja, java.lang.String separator) throws JSONException
separator
string is inserted between each element.
Warning: This method assumes that the data structure is acyclical.separator
- A string that will be inserted between the elements.JSONException
- If the array contains an invalid number.public java.io.Writer write(java.io.Writer writer, JSONObject jo) throws JSONException
Warning: This method assumes that the data structure is acyclical.
JSONException
public java.io.Writer write(java.io.Writer writer, JSONArray ja) throws JSONException
Warning: This method assumes that the data structure is acyclical.
JSONException
public java.lang.String doubleToString(double d)
d
- A double."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"