diff --git a/src/main/java/JSON-Java/allclasses-index.html b/src/main/java/JSON-Java/allclasses-index.html new file mode 100644 index 0000000..7e07d3a --- /dev/null +++ b/src/main/java/JSON-Java/allclasses-index.html @@ -0,0 +1,189 @@ + + + + +All Classes and Interfaces + + + + + + + + + + + + + + + +
+ +
+
+
+

All Classes and Interfaces

+
+
+
+
+
+
Class
+
Description
+ +
+
This provides static methods to convert comma (or otherwise) delimited text into a + JSONArray, and to convert a JSONArray into comma (or otherwise) delimited text.
+
+ +
+
Convert a web browser cookie specification to a JSONObject and back.
+
+ +
+
Convert a web browser cookie list string to a JSONObject and back.
+
+ +
+
Convert an HTTP header to a JSONObject and back.
+
+ +
+
The HTTPTokener extends the JSONTokener to provide additional methods + for the parsing of HTTP headers.
+
+ +
+
A JSONArray is an ordered sequence of values.
+
+ +
+
The JSONException is thrown by the JSON.org classes when things are amiss.
+
+ +
+
This provides static methods to convert an XML text into a JSONArray or + JSONObject, and to covert a JSONArray or JSONObject into an XML text using + the JsonML transform.
+
+ +
+
Configuration object for the XML to JSONML parser.
+
+ +
+
A JSONObject is an unordered collection of name/value pairs.
+
+ +
+
Configuration object for the JSON parser.
+
+ +
+
A JSON Pointer is a simple query language defined for JSON documents by + RFC 6901.
+
+ +
+
This class allows the user to build a JSONPointer in steps, using + exactly one segment in each step.
+
+ +
+
The JSONPointerException is thrown by JSONPointer if an error occurs + during evaluating a pointer.
+
+ +
+
Use this annotation on a getter method to override the Bean name + parser for Bean -> JSONObject mapping.
+
+ +
+
Use this annotation on a getter method to override the Bean name + parser for Bean -> JSONObject mapping.
+
+ +
+
The JSONString interface allows a toJSONString() + method so that a class can change the behavior of + JSONObject.toString(), JSONArray.toString(), + and JSONWriter.value(Object).
+
+ +
+
JSONStringer provides a quick and convenient way of producing JSON text.
+
+ +
+
A JSONTokener takes a source string and extracts characters and tokens from + it.
+
+ +
+
JSONWriter provides a quick and convenient way of producing JSON text.
+
+ +
+
Configuration base object for parsers.
+
+ +
+
Converts a Property file data into JSONObject and back.
+
+ +
+
This provides static methods to convert an XML text into a JSONObject, and to + covert a JSONObject into an XML text.
+
+ +
+
Configuration object for the XML parser.
+
+ +
+
The XMLTokener extends the JSONTokener to provide additional methods + for the parsing of XML texts.
+
+ +
+
Type conversion configuration interface to be used with xsi:type attributes.
+
+
+
+
+
+
+
+ + diff --git a/src/main/java/JSON-Java/allpackages-index.html b/src/main/java/JSON-Java/allpackages-index.html new file mode 100644 index 0000000..29fe3a1 --- /dev/null +++ b/src/main/java/JSON-Java/allpackages-index.html @@ -0,0 +1,64 @@ + + + + +All Packages + + + + + + + + + + + + + + + +
+ +
+
+
+

All Packages

+
+
Package Summary
+
+
Package
+
Description
+ +
 
+
+
+
+
+ + diff --git a/src/main/java/JSON-Java/constant-values.html b/src/main/java/JSON-Java/constant-values.html new file mode 100644 index 0000000..5e42b6c --- /dev/null +++ b/src/main/java/JSON-Java/constant-values.html @@ -0,0 +1,118 @@ + + + + +Constant Field Values + + + + + + + + + + + + + + + +
+ +
+
+
+

Constant Field Values

+
+

Contents

+ +
+
+
+

org.json.*

+ +
+
+
+
+ + diff --git a/src/main/java/JSON-Java/deprecated-list.html b/src/main/java/JSON-Java/deprecated-list.html new file mode 100644 index 0000000..6aa1fcf --- /dev/null +++ b/src/main/java/JSON-Java/deprecated-list.html @@ -0,0 +1,96 @@ + + + + +Deprecated List + + + + + + + + + + + + + + + +
+ +
+
+
+

Deprecated API

+

Contents

+ +
+
    +
  • +
    +
    Deprecated Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    This constructor has been deprecated in favor of using the new builder + pattern for the configuration. + This constructor may be removed in a future release.
    +
    + +
    +
    This constructor has been deprecated in favor of using the new builder + pattern for the configuration. + This constructor may be removed in a future release.
    +
    + +
    +
    This constructor has been deprecated in favor of using the new builder + pattern for the configuration. + This constructor may be removed or marked private in a future release.
    +
    + +
    +
    This constructor has been deprecated in favor of using the new builder + pattern for the configuration. + This constructor may be removed in a future release.
    +
    +
    +
    +
  • +
+
+
+
+ + diff --git a/src/main/java/JSON-Java/element-list b/src/main/java/JSON-Java/element-list new file mode 100644 index 0000000..6374a8e --- /dev/null +++ b/src/main/java/JSON-Java/element-list @@ -0,0 +1 @@ +org.json diff --git a/src/main/java/JSON-Java/help-doc.html b/src/main/java/JSON-Java/help-doc.html new file mode 100644 index 0000000..e6f26c5 --- /dev/null +++ b/src/main/java/JSON-Java/help-doc.html @@ -0,0 +1,186 @@ + + + + +API Help + + + + + + + + + + + + + + + +
+ +
+
+

JavaDoc Help

+ +
+
+

Navigation

+Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces + +
+
+
+

Kinds of Pages

+The following sections describe the different kinds of pages in this collection. +
+

Package

+

Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:

+
    +
  • Interfaces
  • +
  • Classes
  • +
  • Enum Classes
  • +
  • Exceptions
  • +
  • Errors
  • +
  • Annotation Interfaces
  • +
+
+
+

Class or Interface

+

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.

+
    +
  • Class Inheritance Diagram
  • +
  • Direct Subclasses
  • +
  • All Known Subinterfaces
  • +
  • All Known Implementing Classes
  • +
  • Class or Interface Declaration
  • +
  • Class or Interface Description
  • +
+
+
    +
  • Nested Class Summary
  • +
  • Enum Constant Summary
  • +
  • Field Summary
  • +
  • Property Summary
  • +
  • Constructor Summary
  • +
  • Method Summary
  • +
  • Required Element Summary
  • +
  • Optional Element Summary
  • +
+
+
    +
  • Enum Constant Details
  • +
  • Field Details
  • +
  • Property Details
  • +
  • Constructor Details
  • +
  • Method Details
  • +
  • Element Details
  • +
+

Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.

+

The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

+
+
+

Other Files

+

Packages and modules may contain pages with additional information related to the declarations nearby.

+
+
+

Tree (Class Hierarchy)

+

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

+
    +
  • When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
  • +
  • When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
  • +
+
+
+

Deprecated API

+

The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to shortcomings, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

+
+
+

Constant Field Values

+

The Constant Field Values page lists the static final fields and their values.

+
+
+

Serialized Form

+

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See Also" section of the class description.

+
+
+

All Packages

+

The All Packages page contains an alphabetic index of all packages contained in the documentation.

+
+
+

All Classes and Interfaces

+

The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.

+
+
+

Index

+

The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.

+
+
+
+This help file applies to API documentation generated by the standard doclet.
+
+
+ + diff --git a/src/main/java/JSON-Java/index-all.html b/src/main/java/JSON-Java/index-all.html new file mode 100644 index 0000000..5fd505f --- /dev/null +++ b/src/main/java/JSON-Java/index-all.html @@ -0,0 +1,1914 @@ + + + + +Index + + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+A B C D E G H I J K L M N O P Q R S T U V W X 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form +

A

+
+
accumulate(String, Object) - Method in class org.json.JSONObject
+
+
Accumulate values under a key.
+
+
AMP - Static variable in class org.json.XML
+
+
The Character '&'.
+
+
APOS - Static variable in class org.json.XML
+
+
The Character '''.
+
+
append(int) - Method in class org.json.JSONPointer.Builder
+
+
Adds an integer to the reference token list.
+
+
append(String) - Method in class org.json.JSONPointer.Builder
+
+
Adds an arbitrary token to the list of reference tokens.
+
+
append(String, Object) - Method in class org.json.JSONObject
+
+
Append values to the array under a key.
+
+
array() - Method in class org.json.JSONWriter
+
+
Begin appending a new array.
+
+
+

B

+
+
back() - Method in class org.json.JSONTokener
+
+
Back up one character.
+
+
BANG - Static variable in class org.json.XML
+
+
The Character '!'.
+
+
build() - Method in class org.json.JSONPointer.Builder
+
+
Creates a JSONPointer instance using the tokens previously set using the + JSONPointer.Builder.append(String) method calls.
+
+
builder() - Static method in class org.json.JSONPointer
+
+
Static factory method for JSONPointer.Builder.
+
+
Builder() - Constructor for class org.json.JSONPointer.Builder
+
+
Constructs a new Builder object.
+
+
+

C

+
+
CDL - Class in org.json
+
+
This provides static methods to convert comma (or otherwise) delimited text into a + JSONArray, and to convert a JSONArray into comma (or otherwise) delimited text.
+
+
CDL() - Constructor for class org.json.CDL
+
+
Constructs a new CDL object.
+
+
clear() - Method in class org.json.JSONArray
+
+
Removes all of the elements from this JSONArray.
+
+
clear() - Method in class org.json.JSONObject
+
+
Removes all of the elements from this JSONObject.
+
+
clone() - Method in class org.json.JSONMLParserConfiguration
+
+
Provides a new instance of the same configuration.
+
+
clone() - Method in class org.json.JSONParserConfiguration
+
 
+
clone() - Method in class org.json.ParserConfiguration
+
+
Provides a new instance of the same configuration.
+
+
clone() - Method in class org.json.XMLParserConfiguration
+
+
Provides a new instance of the same configuration.
+
+
close() - Method in class org.json.JSONTokener
+
+
Closes the underlying reader, releasing any resources associated with it.
+
+
convert(String) - Method in interface org.json.XMLXsiTypeConverter
+
+
Converts an XML xsi:type attribute value to the specified type T.
+
+
Cookie - Class in org.json
+
+
Convert a web browser cookie specification to a JSONObject and back.
+
+
Cookie() - Constructor for class org.json.Cookie
+
+
Constructs a new Cookie object.
+
+
CookieList - Class in org.json
+
+
Convert a web browser cookie list string to a JSONObject and back.
+
+
CookieList() - Constructor for class org.json.CookieList
+
+
Constructs a new CookieList object.
+
+
CRLF - Static variable in class org.json.HTTP
+
+
Carriage return/line feed.
+
+
+

D

+
+
DEFAULT_MAXIMUM_NESTING_DEPTH - Static variable in class org.json.JSONMLParserConfiguration
+
+
We can override the default maximum nesting depth if needed.
+
+
DEFAULT_MAXIMUM_NESTING_DEPTH - Static variable in class org.json.ParserConfiguration
+
+
The default maximum nesting depth when parsing a document.
+
+
dehexchar(char) - Static method in class org.json.JSONTokener
+
+
Get the hex value of a character (base16).
+
+
doubleToString(double) - Static method in class org.json.JSONObject
+
+
Produce a string from a double.
+
+
+

E

+
+
end() - Method in class org.json.JSONTokener
+
+
Checks if the end of the input has been reached.
+
+
endArray() - Method in class org.json.JSONWriter
+
+
End an array.
+
+
endObject() - Method in class org.json.JSONWriter
+
+
End an object.
+
+
entity - Static variable in class org.json.XMLTokener
+
+
The table of entity values.
+
+
entrySet() - Method in class org.json.JSONObject
+
+
Get a set of entries of the JSONObject.
+
+
EQ - Static variable in class org.json.XML
+
+
The Character '='.
+
+
escape(String) - Static method in class org.json.Cookie
+
+
Produce a copy of a string in which the characters '+', '%', '=', ';' + and control characters are replaced with "%hh".
+
+
escape(String) - Static method in class org.json.XML
+
+
Replace special characters with XML escapes:
+
+
+

G

+
+
get(int) - Method in class org.json.JSONArray
+
+
Get the object value associated with an index.
+
+
get(String) - Method in class org.json.JSONObject
+
+
Get the value object associated with a key.
+
+
getBigDecimal(int) - Method in class org.json.JSONArray
+
+
Get the BigDecimal value associated with an index.
+
+
getBigDecimal(String) - Method in class org.json.JSONObject
+
+
Get the BigDecimal value associated with a key.
+
+
getBigInteger(int) - Method in class org.json.JSONArray
+
+
Get the BigInteger value associated with an index.
+
+
getBigInteger(String) - Method in class org.json.JSONObject
+
+
Get the BigInteger value associated with a key.
+
+
getBoolean(int) - Method in class org.json.JSONArray
+
+
Get the boolean value associated with an index.
+
+
getBoolean(String) - Method in class org.json.JSONObject
+
+
Get the boolean value associated with a key.
+
+
getcDataTagName() - Method in class org.json.XMLParserConfiguration
+
+
The name of the key in a JSON Object that indicates a CDATA section.
+
+
getDouble(int) - Method in class org.json.JSONArray
+
+
Get the double value associated with an index.
+
+
getDouble(String) - Method in class org.json.JSONObject
+
+
Get the double value associated with a key.
+
+
getEnum(Class<E>, int) - Method in class org.json.JSONArray
+
+
Get the enum value associated with an index.
+
+
getEnum(Class<E>, String) - Method in class org.json.JSONObject
+
+
Get the enum value associated with a key.
+
+
getFloat(int) - Method in class org.json.JSONArray
+
+
Get the float value associated with a key.
+
+
getFloat(String) - Method in class org.json.JSONObject
+
+
Get the float value associated with a key.
+
+
getForceList() - Method in class org.json.XMLParserConfiguration
+
+
When parsing the XML into JSON, specifies that tags that will be converted to arrays + in this configuration Set<String> to parse the provided tags' values as arrays
+
+
getInt(int) - Method in class org.json.JSONArray
+
+
Get the int value associated with an index.
+
+
getInt(String) - Method in class org.json.JSONObject
+
+
Get the int value associated with a key.
+
+
getJSONArray(int) - Method in class org.json.JSONArray
+
+
Get the JSONArray associated with an index.
+
+
getJSONArray(String) - Method in class org.json.JSONObject
+
+
Get the JSONArray value associated with a key.
+
+
getJSONObject(int) - Method in class org.json.JSONArray
+
+
Get the JSONObject associated with an index.
+
+
getJSONObject(String) - Method in class org.json.JSONObject
+
+
Get the JSONObject value associated with a key.
+
+
getLong(int) - Method in class org.json.JSONArray
+
+
Get the long value associated with an index.
+
+
getLong(String) - Method in class org.json.JSONObject
+
+
Get the long value associated with a key.
+
+
getMapType() - Method in class org.json.JSONObject
+
+
Retrieves the type of the underlying Map in this class.
+
+
getMaxNestingDepth() - Method in class org.json.ParserConfiguration
+
+
The maximum nesting depth that the parser will descend before throwing an exception + when parsing the XML into JSONML.
+
+
getNames(Object) - Static method in class org.json.JSONObject
+
+
Get an array of public field names from an Object.
+
+
getNames(JSONObject) - Static method in class org.json.JSONObject
+
+
Get an array of field names from a JSONObject.
+
+
getNumber(int) - Method in class org.json.JSONArray
+
+
Get the Number value associated with a key.
+
+
getNumber(String) - Method in class org.json.JSONObject
+
+
Get the Number value associated with a key.
+
+
getPrevious() - Method in class org.json.JSONTokener
+
+
Get the last character read from the input or '\0' if nothing has been read yet.
+
+
getString(int) - Method in class org.json.JSONArray
+
+
Get the string associated with an index.
+
+
getString(String) - Method in class org.json.JSONObject
+
+
Get the string associated with a key.
+
+
getXsiTypeMap() - Method in class org.json.XMLParserConfiguration
+
+
When parsing the XML into JSON, specifies that the values with attribute xsi:type + will be converted to target type defined to client in this configuration + Map<String, XMLXsiTypeConverter<?>> to parse values with attribute + xsi:type="integer" as integer, xsi:type="string" as string
+
+
GT - Static variable in class org.json.XML
+
+
The Character
+
+
+

H

+
+
has(String) - Method in class org.json.JSONObject
+
+
Determine if the JSONObject contains a specific key.
+
+
HTTP - Class in org.json
+
+
Convert an HTTP header to a JSONObject and back.
+
+
HTTP() - Constructor for class org.json.HTTP
+
+
Constructs a new HTTP object.
+
+
HTTPTokener - Class in org.json
+
+
The HTTPTokener extends the JSONTokener to provide additional methods + for the parsing of HTTP headers.
+
+
HTTPTokener(String) - Constructor for class org.json.HTTPTokener
+
+
Construct an HTTPTokener from a string.
+
+
+

I

+
+
increment(String) - Method in class org.json.JSONObject
+
+
Increment a property of a JSONObject.
+
+
isCloseEmptyTag() - Method in class org.json.XMLParserConfiguration
+
+
Checks if the parser should automatically close empty XML tags.
+
+
isConvertNilAttributeToNull() - Method in class org.json.XMLParserConfiguration
+
+
When parsing the XML into JSON, specifies if values with attribute xsi:nil="true" + should be kept as attribute(false), or they should be converted to + null(true)
+
+
isDecimalNotation(String) - Static method in class org.json.JSONObject
+
+
Tests if the value should be tried as a decimal.
+
+
isEmpty() - Method in class org.json.JSONArray
+
+
Check if JSONArray is empty.
+
+
isEmpty() - Method in class org.json.JSONObject
+
+
Check if JSONObject is empty.
+
+
isKeepStrings() - Method in class org.json.ParserConfiguration
+
+
When parsing the XML into JSONML, specifies if values should be kept as strings (true), or if + they should try to be guessed into JSON values (numeric, boolean, string)
+
+
isNull(int) - Method in class org.json.JSONArray
+
+
Determine if the value is null.
+
+
isNull(String) - Method in class org.json.JSONObject
+
+
Determine if the value associated with the key is null or if there is no + value.
+
+
iterator() - Method in class org.json.JSONArray
+
 
+
+

J

+
+
join(String) - Method in class org.json.JSONArray
+
+
Make a string from the contents of this JSONArray.
+
+
JSONArray - Class in org.json
+
+
A JSONArray is an ordered sequence of values.
+
+
JSONArray() - Constructor for class org.json.JSONArray
+
+
Construct an empty JSONArray.
+
+
JSONArray(int) - Constructor for class org.json.JSONArray
+
+
Construct a JSONArray with the specified initial capacity.
+
+
JSONArray(Iterable<?>) - Constructor for class org.json.JSONArray
+
+
Construct a JSONArray from an Iterable.
+
+
JSONArray(Object) - Constructor for class org.json.JSONArray
+
+
Construct a JSONArray from an array.
+
+
JSONArray(String) - Constructor for class org.json.JSONArray
+
+
Construct a JSONArray from a source JSON text.
+
+
JSONArray(Collection<?>) - Constructor for class org.json.JSONArray
+
+
Construct a JSONArray from a Collection.
+
+
JSONArray(Collection<?>, JSONParserConfiguration) - Constructor for class org.json.JSONArray
+
+
Construct a JSONArray from a Collection.
+
+
JSONArray(JSONArray) - Constructor for class org.json.JSONArray
+
+
Construct a JSONArray from another JSONArray.
+
+
JSONArray(JSONTokener) - Constructor for class org.json.JSONArray
+
+
Construct a JSONArray from a JSONTokener.
+
+
JSONException - Exception in org.json
+
+
The JSONException is thrown by the JSON.org classes when things are amiss.
+
+
JSONException(String) - Constructor for exception org.json.JSONException
+
+
Constructs a JSONException with an explanatory message.
+
+
JSONException(String, Throwable) - Constructor for exception org.json.JSONException
+
+
Constructs a JSONException with an explanatory message and cause.
+
+
JSONException(Throwable) - Constructor for exception org.json.JSONException
+
+
Constructs a new JSONException with the specified cause.
+
+
JSONML - Class in org.json
+
+
This provides static methods to convert an XML text into a JSONArray or + JSONObject, and to covert a JSONArray or JSONObject into an XML text using + the JsonML transform.
+
+
JSONML() - Constructor for class org.json.JSONML
+
+
Constructs a new JSONML object.
+
+
JSONMLParserConfiguration - Class in org.json
+
+
Configuration object for the XML to JSONML parser.
+
+
JSONMLParserConfiguration() - Constructor for class org.json.JSONMLParserConfiguration
+
+
Default parser configuration.
+
+
JSONMLParserConfiguration(boolean, int) - Constructor for class org.json.JSONMLParserConfiguration
+
+
Configure the parser string processing and use the default CDATA Tag Name as "content".
+
+
JSONObject - Class in org.json
+
+
A JSONObject is an unordered collection of name/value pairs.
+
+
JSONObject() - Constructor for class org.json.JSONObject
+
+
Construct an empty JSONObject.
+
+
JSONObject(int) - Constructor for class org.json.JSONObject
+
+
Constructor to specify an initial capacity of the internal map.
+
+
JSONObject(Object) - Constructor for class org.json.JSONObject
+
+
Construct a JSONObject from an Object using bean getters.
+
+
JSONObject(Object, String...) - Constructor for class org.json.JSONObject
+
+
Construct a JSONObject from an Object, using reflection to find the + public members.
+
+
JSONObject(String) - Constructor for class org.json.JSONObject
+
+
Construct a JSONObject from a source JSON text string.
+
+
JSONObject(String, Locale) - Constructor for class org.json.JSONObject
+
+
Construct a JSONObject from a ResourceBundle.
+
+
JSONObject(Map<?, ?>) - Constructor for class org.json.JSONObject
+
+
Construct a JSONObject from a Map.
+
+
JSONObject(Map<?, ?>, JSONParserConfiguration) - Constructor for class org.json.JSONObject
+
+
Construct a JSONObject from a Map with custom json parse configurations.
+
+
JSONObject(JSONObject, String...) - Constructor for class org.json.JSONObject
+
+
Construct a JSONObject from a subset of another JSONObject.
+
+
JSONObject(JSONTokener) - Constructor for class org.json.JSONObject
+
+
Construct a JSONObject from a JSONTokener.
+
+
JSONParserConfiguration - Class in org.json
+
+
Configuration object for the JSON parser.
+
+
JSONParserConfiguration() - Constructor for class org.json.JSONParserConfiguration
+
+
Configuration with the default values.
+
+
JSONPointer - Class in org.json
+
+
A JSON Pointer is a simple query language defined for JSON documents by + RFC 6901.
+
+
JSONPointer(String) - Constructor for class org.json.JSONPointer
+
+
Pre-parses and initializes a new JSONPointer instance.
+
+
JSONPointer(List<String>) - Constructor for class org.json.JSONPointer
+
+
Constructs a new JSONPointer instance with the provided list of reference tokens.
+
+
JSONPointer.Builder - Class in org.json
+
+
This class allows the user to build a JSONPointer in steps, using + exactly one segment in each step.
+
+
JSONPointerException - Exception in org.json
+
+
The JSONPointerException is thrown by JSONPointer if an error occurs + during evaluating a pointer.
+
+
JSONPointerException(String) - Constructor for exception org.json.JSONPointerException
+
+
Constructs a new JSONPointerException with the specified error message.
+
+
JSONPointerException(String, Throwable) - Constructor for exception org.json.JSONPointerException
+
+
Constructs a new JSONPointerException with the specified error message and cause.
+
+
JSONPropertyIgnore - Annotation Interface in org.json
+
+
Use this annotation on a getter method to override the Bean name + parser for Bean -> JSONObject mapping.
+
+
JSONPropertyName - Annotation Interface in org.json
+
+
Use this annotation on a getter method to override the Bean name + parser for Bean -> JSONObject mapping.
+
+
JSONString - Interface in org.json
+
+
The JSONString interface allows a toJSONString() + method so that a class can change the behavior of + JSONObject.toString(), JSONArray.toString(), + and JSONWriter.value(Object).
+
+
JSONStringer - Class in org.json
+
+
JSONStringer provides a quick and convenient way of producing JSON text.
+
+
JSONStringer() - Constructor for class org.json.JSONStringer
+
+
Make a fresh JSONStringer.
+
+
JSONTokener - Class in org.json
+
+
A JSONTokener takes a source string and extracts characters and tokens from + it.
+
+
JSONTokener(InputStream) - Constructor for class org.json.JSONTokener
+
+
Construct a JSONTokener from an InputStream.
+
+
JSONTokener(Reader) - Constructor for class org.json.JSONTokener
+
+
Construct a JSONTokener from a Reader.
+
+
JSONTokener(String) - Constructor for class org.json.JSONTokener
+
+
Construct a JSONTokener from a string.
+
+
JSONWriter - Class in org.json
+
+
JSONWriter provides a quick and convenient way of producing JSON text.
+
+
JSONWriter(Appendable) - Constructor for class org.json.JSONWriter
+
+
Make a fresh JSONWriter.
+
+
+

K

+
+
KEEP_STRINGS - Static variable in class org.json.JSONMLParserConfiguration
+
+
Original configuration of the XML to JSONML Parser except that values are kept as strings.
+
+
KEEP_STRINGS - Static variable in class org.json.XMLParserConfiguration
+
+
Original configuration of the XML Parser except that values are kept as strings.
+
+
keepStrings - Variable in class org.json.ParserConfiguration
+
+
Specifies if values should be kept as strings (true), or if + they should try to be guessed into JSON values (numeric, boolean, string)
+
+
key(String) - Method in class org.json.JSONWriter
+
+
Append a key.
+
+
keys() - Method in class org.json.JSONObject
+
+
Get an enumeration of the keys of the JSONObject.
+
+
keySet() - Method in class org.json.JSONObject
+
+
Get a set of keys of the JSONObject.
+
+
+

L

+
+
length() - Method in class org.json.JSONArray
+
+
Get the number of elements in the JSONArray, included nulls.
+
+
length() - Method in class org.json.JSONObject
+
+
Get the number of keys stored in the JSONObject.
+
+
LT - Static variable in class org.json.XML
+
+
The Character '<'.
+
+
+

M

+
+
maxNestingDepth - Variable in class org.json.ParserConfiguration
+
+
The maximum nesting depth when parsing a document.
+
+
mode - Variable in class org.json.JSONWriter
+
+
The current mode.
+
+
more() - Method in class org.json.JSONTokener
+
+
Determine if the source string still contains characters that next() + can consume.
+
+
+

N

+
+
names() - Method in class org.json.JSONObject
+
+
Produce a JSONArray containing the names of the elements of this + JSONObject.
+
+
next() - Method in class org.json.JSONTokener
+
+
Get the next character in the source string.
+
+
next(char) - Method in class org.json.JSONTokener
+
+
Consume the next character, and check that it matches a specified + character.
+
+
next(int) - Method in class org.json.JSONTokener
+
+
Get the next n characters.
+
+
nextCDATA() - Method in class org.json.XMLTokener
+
+
Get the text in the CDATA block.
+
+
nextClean() - Method in class org.json.JSONTokener
+
+
Get the next char in the string, skipping whitespace.
+
+
nextContent() - Method in class org.json.XMLTokener
+
+
Get the next XML outer token, trimming whitespace.
+
+
nextEntity(char) - Method in class org.json.XMLTokener
+
+
+ Return the next entity. These entities are translated to Characters: + &amp; &apos; &gt; &lt; &quot;. +
+
+
nextMeta() - Method in class org.json.XMLTokener
+
+
+ Returns the next XML meta token. This is used for skipping over <!...> + and <?...?> structures. +
+
+
nextString(char) - Method in class org.json.JSONTokener
+
+
Return the characters up to the next close quote character.
+
+
nextTo(char) - Method in class org.json.JSONTokener
+
+
Get the text up but not including the specified character or the + end of line, whichever comes first.
+
+
nextTo(String) - Method in class org.json.JSONTokener
+
+
Get the text up but not including one of the specified delimiter + characters or the end of line, whichever comes first.
+
+
nextToken() - Method in class org.json.HTTPTokener
+
+
Get the next token or string.
+
+
nextToken() - Method in class org.json.XMLTokener
+
+
+ Get the next XML Token. These tokens are found inside of angle + brackets. It may be one of these characters: / > = ! ? or it + may be a string wrapped in single quotes or double quotes, or it may be a + name. +
+
+
nextValue() - Method in class org.json.JSONTokener
+
+
Get the next value.
+
+
noSpace(String) - Static method in class org.json.XML
+
+
Throw an exception if the string contains whitespace.
+
+
NULL - Static variable in class org.json.JSONObject
+
+
It is sometimes more convenient and less ambiguous to have a + NULL object than to use Java's null value.
+
+
NULL_ATTR - Static variable in class org.json.XML
+
+
Null attribute name
+
+
numberToString(Number) - Static method in class org.json.JSONObject
+
+
Produce a string from a Number.
+
+
+

O

+
+
object() - Method in class org.json.JSONWriter
+
+
Begin appending a new object.
+
+
opt(int) - Method in class org.json.JSONArray
+
+
Get the optional object value associated with an index.
+
+
opt(String) - Method in class org.json.JSONObject
+
+
Get an optional value associated with a key.
+
+
optBigDecimal(int, BigDecimal) - Method in class org.json.JSONArray
+
+
Get the optional BigDecimal value associated with an index.
+
+
optBigDecimal(String, BigDecimal) - Method in class org.json.JSONObject
+
+
Get an optional BigDecimal associated with a key, or the defaultValue if + there is no such key or if its value is not a number.
+
+
optBigInteger(int, BigInteger) - Method in class org.json.JSONArray
+
+
Get the optional BigInteger value associated with an index.
+
+
optBigInteger(String, BigInteger) - Method in class org.json.JSONObject
+
+
Get an optional BigInteger associated with a key, or the defaultValue if + there is no such key or if its value is not a number.
+
+
optBoolean(int) - Method in class org.json.JSONArray
+
+
Get the optional boolean value associated with an index.
+
+
optBoolean(int, boolean) - Method in class org.json.JSONArray
+
+
Get the optional boolean value associated with an index.
+
+
optBoolean(String) - Method in class org.json.JSONObject
+
+
Get an optional boolean associated with a key.
+
+
optBoolean(String, boolean) - Method in class org.json.JSONObject
+
+
Get an optional boolean associated with a key.
+
+
optBooleanObject(int) - Method in class org.json.JSONArray
+
+
Get the optional Boolean object associated with an index.
+
+
optBooleanObject(int, Boolean) - Method in class org.json.JSONArray
+
+
Get the optional Boolean object associated with an index.
+
+
optBooleanObject(String) - Method in class org.json.JSONObject
+
+
Get an optional boolean object associated with a key.
+
+
optBooleanObject(String, Boolean) - Method in class org.json.JSONObject
+
+
Get an optional boolean object associated with a key.
+
+
optDouble(int) - Method in class org.json.JSONArray
+
+
Get the optional double value associated with an index.
+
+
optDouble(int, double) - Method in class org.json.JSONArray
+
+
Get the optional double value associated with an index.
+
+
optDouble(String) - Method in class org.json.JSONObject
+
+
Get an optional double associated with a key, or NaN if there is no such + key or if its value is not a number.
+
+
optDouble(String, double) - Method in class org.json.JSONObject
+
+
Get an optional double associated with a key, or the defaultValue if + there is no such key or if its value is not a number.
+
+
optDoubleObject(int) - Method in class org.json.JSONArray
+
+
Get the optional Double object associated with an index.
+
+
optDoubleObject(int, Double) - Method in class org.json.JSONArray
+
+
Get the optional double value associated with an index.
+
+
optDoubleObject(String) - Method in class org.json.JSONObject
+
+
Get an optional Double object associated with a key, or NaN if there is no such + key or if its value is not a number.
+
+
optDoubleObject(String, Double) - Method in class org.json.JSONObject
+
+
Get an optional Double object associated with a key, or the defaultValue if + there is no such key or if its value is not a number.
+
+
optEnum(Class<E>, int) - Method in class org.json.JSONArray
+
+
Get the enum value associated with a key.
+
+
optEnum(Class<E>, int, E) - Method in class org.json.JSONArray
+
+
Get the enum value associated with a key.
+
+
optEnum(Class<E>, String) - Method in class org.json.JSONObject
+
+
Get the enum value associated with a key.
+
+
optEnum(Class<E>, String, E) - Method in class org.json.JSONObject
+
+
Get the enum value associated with a key.
+
+
optFloat(int) - Method in class org.json.JSONArray
+
+
Get the optional float value associated with an index.
+
+
optFloat(int, float) - Method in class org.json.JSONArray
+
+
Get the optional float value associated with an index.
+
+
optFloat(String) - Method in class org.json.JSONObject
+
+
Get the optional float value associated with an index.
+
+
optFloat(String, float) - Method in class org.json.JSONObject
+
+
Get the optional float value associated with an index.
+
+
optFloatObject(int) - Method in class org.json.JSONArray
+
+
Get the optional Float object associated with an index.
+
+
optFloatObject(int, Float) - Method in class org.json.JSONArray
+
+
Get the optional Float object associated with an index.
+
+
optFloatObject(String) - Method in class org.json.JSONObject
+
+
Get the optional Float object associated with an index.
+
+
optFloatObject(String, Float) - Method in class org.json.JSONObject
+
+
Get the optional Float object associated with an index.
+
+
optInt(int) - Method in class org.json.JSONArray
+
+
Get the optional int value associated with an index.
+
+
optInt(int, int) - Method in class org.json.JSONArray
+
+
Get the optional int value associated with an index.
+
+
optInt(String) - Method in class org.json.JSONObject
+
+
Get an optional int value associated with a key, or zero if there is no + such key or if the value is not a number.
+
+
optInt(String, int) - Method in class org.json.JSONObject
+
+
Get an optional int value associated with a key, or the default if there + is no such key or if the value is not a number.
+
+
optIntegerObject(int) - Method in class org.json.JSONArray
+
+
Get the optional Integer object associated with an index.
+
+
optIntegerObject(int, Integer) - Method in class org.json.JSONArray
+
+
Get the optional Integer object associated with an index.
+
+
optIntegerObject(String) - Method in class org.json.JSONObject
+
+
Get an optional Integer object associated with a key, or zero if there is no + such key or if the value is not a number.
+
+
optIntegerObject(String, Integer) - Method in class org.json.JSONObject
+
+
Get an optional Integer object associated with a key, or the default if there + is no such key or if the value is not a number.
+
+
optJSONArray(int) - Method in class org.json.JSONArray
+
+
Get the optional JSONArray associated with an index.
+
+
optJSONArray(int, JSONArray) - Method in class org.json.JSONArray
+
+
Get the optional JSONArray associated with an index.
+
+
optJSONArray(String) - Method in class org.json.JSONObject
+
+
Get an optional JSONArray associated with a key.
+
+
optJSONArray(String, JSONArray) - Method in class org.json.JSONObject
+
+
Get an optional JSONArray associated with a key, or the default if there + is no such key, or if its value is not a JSONArray.
+
+
optJSONObject(int) - Method in class org.json.JSONArray
+
+
Get the optional JSONObject associated with an index.
+
+
optJSONObject(int, JSONObject) - Method in class org.json.JSONArray
+
+
Get the optional JSONObject associated with an index.
+
+
optJSONObject(String) - Method in class org.json.JSONObject
+
+
Get an optional JSONObject associated with a key.
+
+
optJSONObject(String, JSONObject) - Method in class org.json.JSONObject
+
+
Get an optional JSONObject associated with a key, or the default if there + is no such key or if the value is not a JSONObject.
+
+
optLong(int) - Method in class org.json.JSONArray
+
+
Get the optional long value associated with an index.
+
+
optLong(int, long) - Method in class org.json.JSONArray
+
+
Get the optional long value associated with an index.
+
+
optLong(String) - Method in class org.json.JSONObject
+
+
Get an optional long value associated with a key, or zero if there is no + such key or if the value is not a number.
+
+
optLong(String, long) - Method in class org.json.JSONObject
+
+
Get an optional long value associated with a key, or the default if there + is no such key or if the value is not a number.
+
+
optLongObject(int) - Method in class org.json.JSONArray
+
+
Get the optional Long object associated with an index.
+
+
optLongObject(int, Long) - Method in class org.json.JSONArray
+
+
Get the optional Long object associated with an index.
+
+
optLongObject(String) - Method in class org.json.JSONObject
+
+
Get an optional Long object associated with a key, or zero if there is no + such key or if the value is not a number.
+
+
optLongObject(String, Long) - Method in class org.json.JSONObject
+
+
Get an optional Long object associated with a key, or the default if there + is no such key or if the value is not a number.
+
+
optNumber(int) - Method in class org.json.JSONArray
+
+
Get an optional Number value associated with a key, or null + if there is no such key or if the value is not a number.
+
+
optNumber(int, Number) - Method in class org.json.JSONArray
+
+
Get an optional Number value associated with a key, or the default if there + is no such key or if the value is not a number.
+
+
optNumber(String) - Method in class org.json.JSONObject
+
+
Get an optional Number value associated with a key, or null + if there is no such key or if the value is not a number.
+
+
optNumber(String, Number) - Method in class org.json.JSONObject
+
+
Get an optional Number value associated with a key, or the default if there + is no such key or if the value is not a number.
+
+
optQuery(String) - Method in class org.json.JSONArray
+
+
Queries and returns a value from this object using jsonPointer, or + returns null if the query fails due to a missing key.
+
+
optQuery(String) - Method in class org.json.JSONObject
+
+
Queries and returns a value from this object using jsonPointer, or + returns null if the query fails due to a missing key.
+
+
optQuery(JSONPointer) - Method in class org.json.JSONArray
+
+
Queries and returns a value from this object using jsonPointer, or + returns null if the query fails due to a missing key.
+
+
optQuery(JSONPointer) - Method in class org.json.JSONObject
+
+
Queries and returns a value from this object using jsonPointer, or + returns null if the query fails due to a missing key.
+
+
optString(int) - Method in class org.json.JSONArray
+
+
Get the optional string value associated with an index.
+
+
optString(int, String) - Method in class org.json.JSONArray
+
+
Get the optional string associated with an index.
+
+
optString(String) - Method in class org.json.JSONObject
+
+
Get an optional string associated with a key.
+
+
optString(String, String) - Method in class org.json.JSONObject
+
+
Get an optional string associated with a key.
+
+
org.json - package org.json
+
 
+
ORIGINAL - Static variable in class org.json.JSONMLParserConfiguration
+
+
Original Configuration of the XML to JSONML Parser.
+
+
ORIGINAL - Static variable in class org.json.XMLParserConfiguration
+
+
Original Configuration of the XML Parser.
+
+
+

P

+
+
ParserConfiguration - Class in org.json
+
+
Configuration base object for parsers.
+
+
ParserConfiguration() - Constructor for class org.json.ParserConfiguration
+
+
Constructs a new ParserConfiguration with default settings.
+
+
ParserConfiguration(boolean, int) - Constructor for class org.json.ParserConfiguration
+
+
Constructs a new ParserConfiguration with the specified settings.
+
+
Property - Class in org.json
+
+
Converts a Property file data into JSONObject and back.
+
+
Property() - Constructor for class org.json.Property
+
+
Constructs a new Property object.
+
+
put(boolean) - Method in class org.json.JSONArray
+
+
Append a boolean value.
+
+
put(double) - Method in class org.json.JSONArray
+
+
Append a double value.
+
+
put(float) - Method in class org.json.JSONArray
+
+
Append a float value.
+
+
put(int) - Method in class org.json.JSONArray
+
+
Append an int value.
+
+
put(int, boolean) - Method in class org.json.JSONArray
+
+
Put or replace a boolean value in the JSONArray.
+
+
put(int, double) - Method in class org.json.JSONArray
+
+
Put or replace a double value.
+
+
put(int, float) - Method in class org.json.JSONArray
+
+
Put or replace a float value.
+
+
put(int, int) - Method in class org.json.JSONArray
+
+
Put or replace an int value.
+
+
put(int, long) - Method in class org.json.JSONArray
+
+
Put or replace a long value.
+
+
put(int, Object) - Method in class org.json.JSONArray
+
+
Put or replace an object value in the JSONArray.
+
+
put(int, Collection<?>) - Method in class org.json.JSONArray
+
+
Put a value in the JSONArray, where the value will be a JSONArray which + is produced from a Collection.
+
+
put(int, Map<?, ?>) - Method in class org.json.JSONArray
+
+
Put a value in the JSONArray, where the value will be a JSONObject that + is produced from a Map.
+
+
put(int, Map<?, ?>, JSONParserConfiguration) - Method in class org.json.JSONArray
+
+
Put a value in the JSONArray, where the value will be a JSONObject that + is produced from a Map.
+
+
put(long) - Method in class org.json.JSONArray
+
+
Append an long value.
+
+
put(Object) - Method in class org.json.JSONArray
+
+
Append an object value.
+
+
put(String, boolean) - Method in class org.json.JSONObject
+
+
Put a key/boolean pair in the JSONObject.
+
+
put(String, double) - Method in class org.json.JSONObject
+
+
Put a key/double pair in the JSONObject.
+
+
put(String, float) - Method in class org.json.JSONObject
+
+
Put a key/float pair in the JSONObject.
+
+
put(String, int) - Method in class org.json.JSONObject
+
+
Put a key/int pair in the JSONObject.
+
+
put(String, long) - Method in class org.json.JSONObject
+
+
Put a key/long pair in the JSONObject.
+
+
put(String, Object) - Method in class org.json.JSONObject
+
+
Put a key/value pair in the JSONObject.
+
+
put(String, Collection<?>) - Method in class org.json.JSONObject
+
+
Put a key/value pair in the JSONObject, where the value will be a + JSONArray which is produced from a Collection.
+
+
put(String, Map<?, ?>) - Method in class org.json.JSONObject
+
+
Put a key/value pair in the JSONObject, where the value will be a + JSONObject which is produced from a Map.
+
+
put(Collection<?>) - Method in class org.json.JSONArray
+
+
Put a value in the JSONArray, where the value will be a JSONArray which + is produced from a Collection.
+
+
put(Map<?, ?>) - Method in class org.json.JSONArray
+
+
Put a value in the JSONArray, where the value will be a JSONObject which + is produced from a Map.
+
+
putAll(Iterable<?>) - Method in class org.json.JSONArray
+
+
Put an Iterable's elements in to the JSONArray.
+
+
putAll(Object) - Method in class org.json.JSONArray
+
+
Put an array's elements in to the JSONArray.
+
+
putAll(Collection<?>) - Method in class org.json.JSONArray
+
+
Put a collection's elements in to the JSONArray.
+
+
putAll(JSONArray) - Method in class org.json.JSONArray
+
+
Put a JSONArray's elements in to the JSONArray.
+
+
putOnce(String, Object) - Method in class org.json.JSONObject
+
+
Put a key/value pair in the JSONObject, but only if the key and the value + are both non-null, and only if there is not already a member with that + name.
+
+
putOpt(String, Object) - Method in class org.json.JSONObject
+
+
Put a key/value pair in the JSONObject, but only if the key and the value + are both non-null.
+
+
+

Q

+
+
query(String) - Method in class org.json.JSONArray
+
+
Creates a JSONPointer using an initialization string and tries to + match it to an item within this JSONArray.
+
+
query(String) - Method in class org.json.JSONObject
+
+
Creates a JSONPointer using an initialization string and tries to + match it to an item within this JSONObject.
+
+
query(JSONPointer) - Method in class org.json.JSONArray
+
+
Uses a user initialized JSONPointer and tries to + match it to an item within this JSONArray.
+
+
query(JSONPointer) - Method in class org.json.JSONObject
+
+
Uses a user initialized JSONPointer and tries to + match it to an item within this JSONObject.
+
+
queryFrom(Object) - Method in class org.json.JSONPointer
+
+
Evaluates this JSON Pointer on the given document.
+
+
QUEST - Static variable in class org.json.XML
+
+
The Character '?'.
+
+
QUOT - Static variable in class org.json.XML
+
+
The Character '"'.
+
+
quote(String) - Static method in class org.json.JSONObject
+
+
Produce a string in double quotes with backslash sequences in all the + right places.
+
+
quote(String, Writer) - Static method in class org.json.JSONObject
+
+
Quotes a string and appends the result to a given Writer.
+
+
+

R

+
+
remove(int) - Method in class org.json.JSONArray
+
+
Remove an index and close the hole.
+
+
remove(String) - Method in class org.json.JSONObject
+
+
Remove a name and its value, if present.
+
+
rowToJSONArray(JSONTokener) - Static method in class org.json.CDL
+
+
Produce a JSONArray of strings from a row of comma delimited values.
+
+
rowToJSONArray(JSONTokener, char) - Static method in class org.json.CDL
+
+
Produce a JSONArray of strings from a row of comma delimited values.
+
+
rowToJSONObject(JSONArray, JSONTokener) - Static method in class org.json.CDL
+
+
Produce a JSONObject from a row of comma delimited text, using a + parallel JSONArray of strings to provides the names of the elements.
+
+
rowToJSONObject(JSONArray, JSONTokener, char) - Static method in class org.json.CDL
+
+
Produce a JSONObject from a row of comma delimited text, using a + parallel JSONArray of strings to provides the names of the elements.
+
+
rowToString(JSONArray) - Static method in class org.json.CDL
+
+
Produce a comma delimited text row from a JSONArray.
+
+
rowToString(JSONArray, char) - Static method in class org.json.CDL
+
+
Produce a comma delimited text row from a JSONArray.
+
+
+

S

+
+
shouldTrimWhiteSpace() - Method in class org.json.XMLParserConfiguration
+
+
Checks if the parser should trim white spaces from XML content.
+
+
similar(Object) - Method in class org.json.JSONArray
+
+
Determine if two JSONArrays are similar.
+
+
similar(Object) - Method in class org.json.JSONObject
+
+
Determine if two JSONObjects are similar.
+
+
skipPast(String) - Method in class org.json.XMLTokener
+
+
Skip characters until past the requested string.
+
+
skipTo(char) - Method in class org.json.JSONTokener
+
+
Skip characters until the next character is the requested character.
+
+
SLASH - Static variable in class org.json.XML
+
+
The Character '/'.
+
+
stringToNumber(String) - Static method in class org.json.JSONObject
+
+
Converts a string to a number using the narrowest possible type.
+
+
stringToValue(String) - Static method in class org.json.JSONObject
+
+
Try to convert a string into a number, boolean, or null.
+
+
stringToValue(String) - Static method in class org.json.XML
+
+
This method is the same as JSONObject.stringToValue(String).
+
+
stringToValue(String, XMLXsiTypeConverter<?>) - Static method in class org.json.XML
+
+
This method tries to convert the given string value to the target object
+
+
syntaxError(String) - Method in class org.json.JSONTokener
+
+
Make a JSONException to signal a syntax error.
+
+
syntaxError(String, Throwable) - Method in class org.json.JSONTokener
+
+
Make a JSONException to signal a syntax error.
+
+
+

T

+
+
testValidity(Object) - Static method in class org.json.JSONObject
+
+
Throw an exception if the object is a NaN or infinite number.
+
+
toJSONArray(String) - Static method in class org.json.CDL
+
+
Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
+
+
toJSONArray(String) - Static method in class org.json.JSONML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform.
+
+
toJSONArray(String, boolean) - Static method in class org.json.JSONML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform.
+
+
toJSONArray(String, char) - Static method in class org.json.CDL
+
+
Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
+
+
toJSONArray(String, JSONMLParserConfiguration) - Static method in class org.json.JSONML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform.
+
+
toJSONArray(JSONArray) - Method in class org.json.JSONObject
+
+
Produce a JSONArray containing the values of the members of this + JSONObject.
+
+
toJSONArray(JSONArray, String) - Static method in class org.json.CDL
+
+
Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
+
+
toJSONArray(JSONArray, String, char) - Static method in class org.json.CDL
+
+
Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
+
+
toJSONArray(JSONArray, JSONTokener) - Static method in class org.json.CDL
+
+
Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
+
+
toJSONArray(JSONArray, JSONTokener, char) - Static method in class org.json.CDL
+
+
Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
+
+
toJSONArray(JSONTokener) - Static method in class org.json.CDL
+
+
Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
+
+
toJSONArray(JSONTokener, char) - Static method in class org.json.CDL
+
+
Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
+
+
toJSONArray(XMLTokener) - Static method in class org.json.JSONML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform.
+
+
toJSONArray(XMLTokener, boolean) - Static method in class org.json.JSONML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform.
+
+
toJSONArray(XMLTokener, JSONMLParserConfiguration) - Static method in class org.json.JSONML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform.
+
+
toJSONObject(Reader) - Static method in class org.json.XML
+
+
Convert a well-formed (but not necessarily valid) XML into a + JSONObject.
+
+
toJSONObject(Reader, boolean) - Static method in class org.json.XML
+
+
Convert a well-formed (but not necessarily valid) XML into a + JSONObject.
+
+
toJSONObject(Reader, XMLParserConfiguration) - Static method in class org.json.XML
+
+
Convert a well-formed (but not necessarily valid) XML into a + JSONObject.
+
+
toJSONObject(String) - Static method in class org.json.Cookie
+
+
Convert a cookie specification string into a JSONObject.
+
+
toJSONObject(String) - Static method in class org.json.CookieList
+
+
Convert a cookie list into a JSONObject.
+
+
toJSONObject(String) - Static method in class org.json.HTTP
+
+
Convert an HTTP header string into a JSONObject.
+
+
toJSONObject(String) - Static method in class org.json.JSONML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform.
+
+
toJSONObject(String) - Static method in class org.json.XML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONObject.
+
+
toJSONObject(String, boolean) - Static method in class org.json.JSONML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform.
+
+
toJSONObject(String, boolean) - Static method in class org.json.XML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONObject.
+
+
toJSONObject(String, JSONMLParserConfiguration) - Static method in class org.json.JSONML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform.
+
+
toJSONObject(String, XMLParserConfiguration) - Static method in class org.json.XML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONObject.
+
+
toJSONObject(Properties) - Static method in class org.json.Property
+
+
Converts a property file object into a JSONObject.
+
+
toJSONObject(JSONArray) - Method in class org.json.JSONArray
+
+
Produce a JSONObject by combining a JSONArray of names with the values of + this JSONArray.
+
+
toJSONObject(XMLTokener) - Static method in class org.json.JSONML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform.
+
+
toJSONObject(XMLTokener, boolean) - Static method in class org.json.JSONML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform.
+
+
toJSONObject(XMLTokener, JSONMLParserConfiguration) - Static method in class org.json.JSONML
+
+
Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform.
+
+
toJSONString() - Method in interface org.json.JSONString
+
+
The toJSONString method allows a class to produce its own JSON + serialization.
+
+
toList() - Method in class org.json.JSONArray
+
+
Returns a java.util.List containing all of the elements in this array.
+
+
toMap() - Method in class org.json.JSONObject
+
+
Returns a java.util.Map containing all of the entries in this object.
+
+
toProperties(JSONObject) - Static method in class org.json.Property
+
+
Converts the JSONObject into a property file object.
+
+
toString() - Method in class org.json.JSONArray
+
+
Make a JSON text of this JSONArray.
+
+
toString() - Method in class org.json.JSONObject
+
+
Make a JSON text of this JSONObject.
+
+
toString() - Method in class org.json.JSONPointer
+
+
Returns a string representing the JSONPointer path value using string + representation
+
+
toString() - Method in class org.json.JSONStringer
+
+
Return the JSON text.
+
+
toString() - Method in class org.json.JSONTokener
+
+
Make a printable string of this JSONTokener.
+
+
toString(int) - Method in class org.json.JSONArray
+
+
Make a pretty-printed JSON text of this JSONArray.
+
+
toString(int) - Method in class org.json.JSONObject
+
+
Make a pretty-printed JSON text of this JSONObject.
+
+
toString(Object) - Static method in class org.json.XML
+
+
Convert a JSONObject into a well-formed, element-normal XML string.
+
+
toString(Object, int) - Static method in class org.json.XML
+
+
Convert a JSONObject into a well-formed, pretty printed element-normal XML string.
+
+
toString(Object, String) - Static method in class org.json.XML
+
+
Convert a JSONObject into a well-formed, element-normal XML string.
+
+
toString(Object, String, int) - Static method in class org.json.XML
+
+
Convert a JSONObject into a well-formed, pretty printed element-normal XML string.
+
+
toString(Object, String, XMLParserConfiguration) - Static method in class org.json.XML
+
+
Convert a JSONObject into a well-formed, element-normal XML string.
+
+
toString(Object, String, XMLParserConfiguration, int) - Static method in class org.json.XML
+
+
Convert a JSONObject into a well-formed, pretty printed element-normal XML string.
+
+
toString(JSONArray) - Static method in class org.json.CDL
+
+
Produce a comma delimited text from a JSONArray of JSONObjects.
+
+
toString(JSONArray) - Static method in class org.json.JSONML
+
+
Reverse the JSONML transformation, making an XML text from a JSONArray.
+
+
toString(JSONArray, char) - Static method in class org.json.CDL
+
+
Produce a comma delimited text from a JSONArray of JSONObjects.
+
+
toString(JSONArray, JSONArray) - Static method in class org.json.CDL
+
+
Produce a comma delimited text from a JSONArray of JSONObjects using + a provided list of names.
+
+
toString(JSONArray, JSONArray, char) - Static method in class org.json.CDL
+
+
Produce a comma delimited text from a JSONArray of JSONObjects using + a provided list of names.
+
+
toString(JSONObject) - Static method in class org.json.Cookie
+
+
Convert a JSONObject into a cookie specification string.
+
+
toString(JSONObject) - Static method in class org.json.CookieList
+
+
Convert a JSONObject into a cookie list.
+
+
toString(JSONObject) - Static method in class org.json.HTTP
+
+
Convert a JSONObject into an HTTP header.
+
+
toString(JSONObject) - Static method in class org.json.JSONML
+
+
Reverse the JSONML transformation, making an XML text from a JSONObject.
+
+
toURIFragment() - Method in class org.json.JSONPointer
+
+
Returns a string representing the JSONPointer path value using URI + fragment identifier representation
+
+
TYPE_ATTR - Static variable in class org.json.XML
+
+
Represents the XML attribute name for specifying type information.
+
+
+

U

+
+
UNDEFINED_MAXIMUM_NESTING_DEPTH - Static variable in class org.json.ParserConfiguration
+
+
Used to indicate there's no defined limit to the maximum nesting depth when parsing a document.
+
+
unescape(String) - Static method in class org.json.Cookie
+
+
Convert %hh sequences to single characters, and + convert plus to space.
+
+
unescape(String) - Static method in class org.json.XML
+
+
Removes XML escapes from the string.
+
+
+

V

+
+
value() - Element in annotation interface org.json.JSONPropertyName
+
+
The value of the JSON property.
+
+
value(boolean) - Method in class org.json.JSONWriter
+
+
Append either the value true or the value + false.
+
+
value(double) - Method in class org.json.JSONWriter
+
+
Append a double value.
+
+
value(long) - Method in class org.json.JSONWriter
+
+
Append a long value.
+
+
value(Object) - Method in class org.json.JSONWriter
+
+
Append an object value.
+
+
valueToString(Object) - Static method in class org.json.JSONObject
+
+
Make a JSON text of an Object value.
+
+
valueToString(Object) - Static method in class org.json.JSONWriter
+
+
Make a JSON text of an Object value.
+
+
+

W

+
+
withcDataTagName(String) - Method in class org.json.XMLParserConfiguration
+
+
The name of the key in a JSON Object that indicates a CDATA section.
+
+
withCloseEmptyTag(boolean) - Method in class org.json.XMLParserConfiguration
+
+
To enable explicit end tag with empty value.
+
+
withConvertNilAttributeToNull(boolean) - Method in class org.json.XMLParserConfiguration
+
+
When parsing the XML into JSON, specifies if values with attribute xsi:nil="true" + should be kept as attribute(false), or they should be converted to + null(true)
+
+
withForceList(Set<String>) - Method in class org.json.XMLParserConfiguration
+
+
When parsing the XML into JSON, specifies that tags that will be converted to arrays + in this configuration Set<String> to parse the provided tags' values as arrays
+
+
withKeepStrings(boolean) - Method in class org.json.JSONMLParserConfiguration
+
 
+
withKeepStrings(boolean) - Method in class org.json.ParserConfiguration
+
+
When parsing the XML into JSONML, specifies if values should be kept as strings (true), or if + they should try to be guessed into JSON values (numeric, boolean, string)
+
+
withKeepStrings(boolean) - Method in class org.json.XMLParserConfiguration
+
+
When parsing the XML into JSON, specifies if values should be kept as strings (true), or if + they should try to be guessed into JSON values (numeric, boolean, string)
+
+
withMaxNestingDepth(int) - Method in class org.json.JSONMLParserConfiguration
+
 
+
withMaxNestingDepth(int) - Method in class org.json.JSONParserConfiguration
+
 
+
withMaxNestingDepth(int) - Method in class org.json.ParserConfiguration
+
+
Defines the maximum nesting depth that the parser will descend before throwing an exception + when parsing the XML into JSONML.
+
+
withMaxNestingDepth(int) - Method in class org.json.XMLParserConfiguration
+
+
Defines the maximum nesting depth that the parser will descend before throwing an exception + when parsing the XML into JSON.
+
+
withShouldTrimWhitespace(boolean) - Method in class org.json.XMLParserConfiguration
+
+
Sets whether whitespace should be trimmed inside of tags.
+
+
withXsiTypeMap(Map<String, XMLXsiTypeConverter<?>>) - Method in class org.json.XMLParserConfiguration
+
+
When parsing the XML into JSON, specifies that the values with attribute xsi:type + will be converted to target type defined to client in this configuration + Map<String, XMLXsiTypeConverter<?>> to parse values with attribute + xsi:type="integer" as integer, xsi:type="string" as string
+
+
wrap(Object) - Static method in class org.json.JSONObject
+
+
Wrap an object, if necessary.
+
+
write(Writer) - Method in class org.json.JSONArray
+
+
Write the contents of the JSONArray as JSON text to a writer.
+
+
write(Writer) - Method in class org.json.JSONObject
+
+
Write the contents of the JSONObject as JSON text to a writer.
+
+
write(Writer, int, int) - Method in class org.json.JSONArray
+
+
Write the contents of the JSONArray as JSON text to a writer.
+
+
write(Writer, int, int) - Method in class org.json.JSONObject
+
+
Write the contents of the JSONObject as JSON text to a writer.
+
+
writer - Variable in class org.json.JSONWriter
+
+
The writer that will receive the output.
+
+
+

X

+
+
XML - Class in org.json
+
+
This provides static methods to convert an XML text into a JSONObject, and to + covert a JSONObject into an XML text.
+
+
XML() - Constructor for class org.json.XML
+
+
Constructs a new XML object.
+
+
XMLParserConfiguration - Class in org.json
+
+
Configuration object for the XML parser.
+
+
XMLParserConfiguration() - Constructor for class org.json.XMLParserConfiguration
+
+
Default parser configuration.
+
+
XMLParserConfiguration(boolean) - Constructor for class org.json.XMLParserConfiguration
+
+
Deprecated. +
This constructor has been deprecated in favor of using the new builder + pattern for the configuration. + This constructor may be removed in a future release.
+
+
+
XMLParserConfiguration(boolean, String) - Constructor for class org.json.XMLParserConfiguration
+
+
Deprecated. +
This constructor has been deprecated in favor of using the new builder + pattern for the configuration. + This constructor may be removed in a future release.
+
+
+
XMLParserConfiguration(boolean, String, boolean) - Constructor for class org.json.XMLParserConfiguration
+
+
Deprecated. +
This constructor has been deprecated in favor of using the new builder + pattern for the configuration. + This constructor may be removed or marked private in a future release.
+
+
+
XMLParserConfiguration(String) - Constructor for class org.json.XMLParserConfiguration
+
+
Deprecated. +
This constructor has been deprecated in favor of using the new builder + pattern for the configuration. + This constructor may be removed in a future release.
+
+
+
XMLTokener - Class in org.json
+
+
The XMLTokener extends the JSONTokener to provide additional methods + for the parsing of XML texts.
+
+
XMLTokener(Reader) - Constructor for class org.json.XMLTokener
+
+
Construct an XMLTokener from a Reader.
+
+
XMLTokener(Reader, XMLParserConfiguration) - Constructor for class org.json.XMLTokener
+
+
Construct an XMLTokener from a Reader and an XMLParserConfiguration.
+
+
XMLTokener(String) - Constructor for class org.json.XMLTokener
+
+
Construct an XMLTokener from a string.
+
+
XMLXsiTypeConverter<T> - Interface in org.json
+
+
Type conversion configuration interface to be used with xsi:type attributes.
+
+
+A B C D E G H I J K L M N O P Q R S T U V W X 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
+
+
+ + diff --git a/src/main/java/JSON-Java/index.html b/src/main/java/JSON-Java/index.html new file mode 100644 index 0000000..5d56677 --- /dev/null +++ b/src/main/java/JSON-Java/index.html @@ -0,0 +1,26 @@ + + + + +Generated Documentation (Untitled) + + + + + + + + + + + +
+ +

org/json/package-summary.html

+
+ + diff --git a/src/main/java/JSON-Java/jquery-ui.overrides.css b/src/main/java/JSON-Java/jquery-ui.overrides.css new file mode 100644 index 0000000..03c010b --- /dev/null +++ b/src/main/java/JSON-Java/jquery-ui.overrides.css @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + /* Overrides the color of selection used in jQuery UI */ + background: #F8981D; + border: 1px solid #F8981D; +} diff --git a/src/main/java/JSON-Java/legal/COPYRIGHT b/src/main/java/JSON-Java/legal/COPYRIGHT new file mode 100644 index 0000000..945e19c --- /dev/null +++ b/src/main/java/JSON-Java/legal/COPYRIGHT @@ -0,0 +1,69 @@ +Copyright © 1993, 2018, Oracle and/or its affiliates. +All rights reserved. + +This software and related documentation are provided under a +license agreement containing restrictions on use and +disclosure and are protected by intellectual property laws. +Except as expressly permitted in your license agreement or +allowed by law, you may not use, copy, reproduce, translate, +broadcast, modify, license, transmit, distribute, exhibit, +perform, publish, or display any part, in any form, or by +any means. Reverse engineering, disassembly, or +decompilation of this software, unless required by law for +interoperability, is prohibited. + +The information contained herein is subject to change +without notice and is not warranted to be error-free. If you +find any errors, please report them to us in writing. + +If this is software or related documentation that is +delivered to the U.S. Government or anyone licensing it on +behalf of the U.S. Government, the following notice is +applicable: + +U.S. GOVERNMENT END USERS: Oracle programs, including any +operating system, integrated software, any programs +installed on the hardware, and/or documentation, delivered +to U.S. Government end users are "commercial computer +software" pursuant to the applicable Federal Acquisition +Regulation and agency-specific supplemental regulations. As +such, use, duplication, disclosure, modification, and +adaptation of the programs, including any operating system, +integrated software, any programs installed on the hardware, +and/or documentation, shall be subject to license terms and +license restrictions applicable to the programs. No other +rights are granted to the U.S. Government. + +This software or hardware is developed for general use in a +variety of information management applications. It is not +developed or intended for use in any inherently dangerous +applications, including applications that may create a risk +of personal injury. If you use this software or hardware in +dangerous applications, then you shall be responsible to +take all appropriate fail-safe, backup, redundancy, and +other measures to ensure its safe use. Oracle Corporation +and its affiliates disclaim any liability for any damages +caused by use of this software or hardware in dangerous +applications. + +Oracle and Java are registered trademarks of Oracle and/or +its affiliates. Other names may be trademarks of their +respective owners. + +Intel and Intel Xeon are trademarks or registered trademarks +of Intel Corporation. All SPARC trademarks are used under +license and are trademarks or registered trademarks of SPARC +International, Inc. AMD, Opteron, the AMD logo, and the AMD +Opteron logo are trademarks or registered trademarks of +Advanced Micro Devices. UNIX is a registered trademark of +The Open Group. + +This software or hardware and documentation may provide +access to or information on content, products, and services +from third parties. Oracle Corporation and its affiliates +are not responsible for and expressly disclaim all +warranties of any kind with respect to third-party content, +products, and services. Oracle Corporation and its +affiliates will not be responsible for any loss, costs, or +damages incurred due to your access to or use of third-party +content, products, or services. diff --git a/src/main/java/JSON-Java/legal/LICENSE b/src/main/java/JSON-Java/legal/LICENSE new file mode 100644 index 0000000..ee860d3 --- /dev/null +++ b/src/main/java/JSON-Java/legal/LICENSE @@ -0,0 +1,118 @@ +Your use of this Program is governed by the No-Fee Terms and Conditions set +forth below, unless you have received this Program (alone or as part of another +Oracle product) under an Oracle license agreement (including but not limited to +the Oracle Master Agreement), in which case your use of this Program is governed +solely by such license agreement with Oracle. + +Oracle No-Fee Terms and Conditions (NFTC) + +Definitions + +"Oracle" refers to Oracle America, Inc. "You" and "Your" refers to (a) a company +or organization (each an "Entity") accessing the Programs, if use of the +Programs will be on behalf of such Entity; or (b) an individual accessing the +Programs, if use of the Programs will not be on behalf of an Entity. +"Program(s)" refers to Oracle software provided by Oracle pursuant to the +following terms and any updates, error corrections, and/or Program Documentation +provided by Oracle. "Program Documentation" refers to Program user manuals and +Program installation manuals, if any. If available, Program Documentation may be +delivered with the Programs and/or may be accessed from +www.oracle.com/documentation. "Separate Terms" refers to separate license terms +that are specified in the Program Documentation, readmes or notice files and +that apply to Separately Licensed Technology. "Separately Licensed Technology" +refers to Oracle or third party technology that is licensed under Separate Terms +and not under the terms of this license. + +Separately Licensed Technology + +Oracle may provide certain notices to You in Program Documentation, readmes or +notice files in connection with Oracle or third party technology provided as or +with the Programs. If specified in the Program Documentation, readmes or notice +files, such technology will be licensed to You under Separate Terms. Your rights +to use Separately Licensed Technology under Separate Terms are not restricted in +any way by the terms herein. For clarity, notwithstanding the existence of a +notice, third party technology that is not Separately Licensed Technology shall +be deemed part of the Programs licensed to You under the terms of this license. + +Source Code for Open Source Software + +For software that You receive from Oracle in binary form that is licensed under +an open source license that gives You the right to receive the source code for +that binary, You can obtain a copy of the applicable source code from +https://oss.oracle.com/sources/ or http://www.oracle.com/goto/opensourcecode. If +the source code for such software was not provided to You with the binary, You +can also receive a copy of the source code on physical media by submitting a +written request pursuant to the instructions in the "Written Offer for Source +Code" section of the latter website. + +------------------------------------------------------------------------------- + +The following license terms apply to those Programs that are not provided to You +under Separate Terms. + +License Rights and Restrictions + +Oracle grants to You, as a recipient of this Program, subject to the conditions +stated herein, a nonexclusive, nontransferable, limited license to: + +(a) internally use the unmodified Programs for the purposes of developing, +testing, prototyping and demonstrating your applications, and running the +Program for Your own personal use or internal business operations; and + +(b) redistribute the unmodified Program and Program Documentation, under the +terms of this License, provided that You do not charge Your licensees any fees +associated with such distribution or use of the Program, including, without +limitation, fees for products that include or are bundled with a copy of the +Program or for services that involve the use of the distributed Program. + +You may make copies of the Programs to the extent reasonably necessary for +exercising the license rights granted herein and for backup purposes. You are +granted the right to use the Programs to provide third party training in the use +of the Programs and associated Separately Licensed Technology only if there is +express authorization of such use by Oracle on the Program's download page or in +the Program Documentation. + +Your license is contingent on compliance with the following conditions: + +- You do not remove markings or notices of either Oracle's or a licensor's + proprietary rights from the Programs or Program Documentation; + +- You comply with all U.S. and applicable export control and economic sanctions + laws and regulations that govern Your use of the Programs (including technical + data); + +- You do not cause or permit reverse engineering, disassembly or decompilation + of the Programs (except as allowed by law) by You nor allow an associated + party to do so. + +For clarity, any source code that may be included in the distribution with the +Programs is provided solely for reference purposes and may not be modified, +unless such source code is under Separate Terms permitting modification. + +Ownership + +Oracle or its licensors retain all ownership and intellectual property rights to +the Programs. + +Information Collection + +The Programs' installation and/or auto-update processes, if any, may transmit a +limited amount of data to Oracle or its service provider about those processes +to help Oracle understand and optimize them. Oracle does not associate the data +with personally identifiable information. Refer to Oracle's Privacy Policy at +www.oracle.com/privacy. + +Disclaimer of Warranties; Limitation of Liability + +THE PROGRAMS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ORACLE FURTHER +DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION, ANY +IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +NONINFRINGEMENT. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL ORACLE BE LIABLE TO YOU FOR +DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT +LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. diff --git a/src/main/java/JSON-Java/legal/jquery.md b/src/main/java/JSON-Java/legal/jquery.md new file mode 100644 index 0000000..d468b31 --- /dev/null +++ b/src/main/java/JSON-Java/legal/jquery.md @@ -0,0 +1,72 @@ +## jQuery v3.6.1 + +### jQuery License +``` +jQuery v 3.6.1 +Copyright OpenJS Foundation and other contributors, https://openjsf.org/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +****************************************** + +The jQuery JavaScript Library v3.6.1 also includes Sizzle.js + +Sizzle.js includes the following license: + +Copyright JS Foundation and other contributors, https://js.foundation/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/sizzle + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +********************* + +``` diff --git a/src/main/java/JSON-Java/legal/jqueryUI.md b/src/main/java/JSON-Java/legal/jqueryUI.md new file mode 100644 index 0000000..8031bdb --- /dev/null +++ b/src/main/java/JSON-Java/legal/jqueryUI.md @@ -0,0 +1,49 @@ +## jQuery UI v1.12.1 + +### jQuery UI License +``` +Copyright jQuery Foundation and other contributors, https://jquery.org/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/jquery-ui + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code contained within the demos directory. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +``` diff --git a/src/main/java/JSON-Java/member-search-index.js b/src/main/java/JSON-Java/member-search-index.js new file mode 100644 index 0000000..16cea08 --- /dev/null +++ b/src/main/java/JSON-Java/member-search-index.js @@ -0,0 +1 @@ +memberSearchIndex = [{"p":"org.json","c":"JSONObject","l":"accumulate(String, Object)","u":"accumulate(java.lang.String,java.lang.Object)"},{"p":"org.json","c":"XML","l":"AMP"},{"p":"org.json","c":"XML","l":"APOS"},{"p":"org.json","c":"JSONPointer.Builder","l":"append(int)"},{"p":"org.json","c":"JSONPointer.Builder","l":"append(String)","u":"append(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"append(String, Object)","u":"append(java.lang.String,java.lang.Object)"},{"p":"org.json","c":"JSONWriter","l":"array()"},{"p":"org.json","c":"JSONTokener","l":"back()"},{"p":"org.json","c":"XML","l":"BANG"},{"p":"org.json","c":"JSONPointer.Builder","l":"build()"},{"p":"org.json","c":"JSONPointer","l":"builder()"},{"p":"org.json","c":"JSONPointer.Builder","l":"Builder()","u":"%3Cinit%3E()"},{"p":"org.json","c":"CDL","l":"CDL()","u":"%3Cinit%3E()"},{"p":"org.json","c":"JSONArray","l":"clear()"},{"p":"org.json","c":"JSONObject","l":"clear()"},{"p":"org.json","c":"JSONMLParserConfiguration","l":"clone()"},{"p":"org.json","c":"JSONParserConfiguration","l":"clone()"},{"p":"org.json","c":"ParserConfiguration","l":"clone()"},{"p":"org.json","c":"XMLParserConfiguration","l":"clone()"},{"p":"org.json","c":"JSONTokener","l":"close()"},{"p":"org.json","c":"XMLXsiTypeConverter","l":"convert(String)","u":"convert(java.lang.String)"},{"p":"org.json","c":"Cookie","l":"Cookie()","u":"%3Cinit%3E()"},{"p":"org.json","c":"CookieList","l":"CookieList()","u":"%3Cinit%3E()"},{"p":"org.json","c":"HTTP","l":"CRLF"},{"p":"org.json","c":"JSONMLParserConfiguration","l":"DEFAULT_MAXIMUM_NESTING_DEPTH"},{"p":"org.json","c":"ParserConfiguration","l":"DEFAULT_MAXIMUM_NESTING_DEPTH"},{"p":"org.json","c":"JSONTokener","l":"dehexchar(char)"},{"p":"org.json","c":"JSONObject","l":"doubleToString(double)"},{"p":"org.json","c":"JSONTokener","l":"end()"},{"p":"org.json","c":"JSONWriter","l":"endArray()"},{"p":"org.json","c":"JSONWriter","l":"endObject()"},{"p":"org.json","c":"XMLTokener","l":"entity"},{"p":"org.json","c":"JSONObject","l":"entrySet()"},{"p":"org.json","c":"XML","l":"EQ"},{"p":"org.json","c":"Cookie","l":"escape(String)","u":"escape(java.lang.String)"},{"p":"org.json","c":"XML","l":"escape(String)","u":"escape(java.lang.String)"},{"p":"org.json","c":"JSONArray","l":"get(int)"},{"p":"org.json","c":"JSONObject","l":"get(String)","u":"get(java.lang.String)"},{"p":"org.json","c":"JSONArray","l":"getBigDecimal(int)"},{"p":"org.json","c":"JSONObject","l":"getBigDecimal(String)","u":"getBigDecimal(java.lang.String)"},{"p":"org.json","c":"JSONArray","l":"getBigInteger(int)"},{"p":"org.json","c":"JSONObject","l":"getBigInteger(String)","u":"getBigInteger(java.lang.String)"},{"p":"org.json","c":"JSONArray","l":"getBoolean(int)"},{"p":"org.json","c":"JSONObject","l":"getBoolean(String)","u":"getBoolean(java.lang.String)"},{"p":"org.json","c":"XMLParserConfiguration","l":"getcDataTagName()"},{"p":"org.json","c":"JSONArray","l":"getDouble(int)"},{"p":"org.json","c":"JSONObject","l":"getDouble(String)","u":"getDouble(java.lang.String)"},{"p":"org.json","c":"JSONArray","l":"getEnum(Class, int)","u":"getEnum(java.lang.Class,int)"},{"p":"org.json","c":"JSONObject","l":"getEnum(Class, String)","u":"getEnum(java.lang.Class,java.lang.String)"},{"p":"org.json","c":"JSONArray","l":"getFloat(int)"},{"p":"org.json","c":"JSONObject","l":"getFloat(String)","u":"getFloat(java.lang.String)"},{"p":"org.json","c":"XMLParserConfiguration","l":"getForceList()"},{"p":"org.json","c":"JSONArray","l":"getInt(int)"},{"p":"org.json","c":"JSONObject","l":"getInt(String)","u":"getInt(java.lang.String)"},{"p":"org.json","c":"JSONArray","l":"getJSONArray(int)"},{"p":"org.json","c":"JSONObject","l":"getJSONArray(String)","u":"getJSONArray(java.lang.String)"},{"p":"org.json","c":"JSONArray","l":"getJSONObject(int)"},{"p":"org.json","c":"JSONObject","l":"getJSONObject(String)","u":"getJSONObject(java.lang.String)"},{"p":"org.json","c":"JSONArray","l":"getLong(int)"},{"p":"org.json","c":"JSONObject","l":"getLong(String)","u":"getLong(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"getMapType()"},{"p":"org.json","c":"ParserConfiguration","l":"getMaxNestingDepth()"},{"p":"org.json","c":"JSONObject","l":"getNames(JSONObject)","u":"getNames(org.json.JSONObject)"},{"p":"org.json","c":"JSONObject","l":"getNames(Object)","u":"getNames(java.lang.Object)"},{"p":"org.json","c":"JSONArray","l":"getNumber(int)"},{"p":"org.json","c":"JSONObject","l":"getNumber(String)","u":"getNumber(java.lang.String)"},{"p":"org.json","c":"JSONTokener","l":"getPrevious()"},{"p":"org.json","c":"JSONArray","l":"getString(int)"},{"p":"org.json","c":"JSONObject","l":"getString(String)","u":"getString(java.lang.String)"},{"p":"org.json","c":"XMLParserConfiguration","l":"getXsiTypeMap()"},{"p":"org.json","c":"XML","l":"GT"},{"p":"org.json","c":"JSONObject","l":"has(String)","u":"has(java.lang.String)"},{"p":"org.json","c":"HTTP","l":"HTTP()","u":"%3Cinit%3E()"},{"p":"org.json","c":"HTTPTokener","l":"HTTPTokener(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"increment(String)","u":"increment(java.lang.String)"},{"p":"org.json","c":"XMLParserConfiguration","l":"isCloseEmptyTag()"},{"p":"org.json","c":"XMLParserConfiguration","l":"isConvertNilAttributeToNull()"},{"p":"org.json","c":"JSONObject","l":"isDecimalNotation(String)","u":"isDecimalNotation(java.lang.String)"},{"p":"org.json","c":"JSONArray","l":"isEmpty()"},{"p":"org.json","c":"JSONObject","l":"isEmpty()"},{"p":"org.json","c":"ParserConfiguration","l":"isKeepStrings()"},{"p":"org.json","c":"JSONArray","l":"isNull(int)"},{"p":"org.json","c":"JSONObject","l":"isNull(String)","u":"isNull(java.lang.String)"},{"p":"org.json","c":"JSONArray","l":"iterator()"},{"p":"org.json","c":"JSONArray","l":"join(String)","u":"join(java.lang.String)"},{"p":"org.json","c":"JSONArray","l":"JSONArray()","u":"%3Cinit%3E()"},{"p":"org.json","c":"JSONArray","l":"JSONArray(Collection)","u":"%3Cinit%3E(java.util.Collection)"},{"p":"org.json","c":"JSONArray","l":"JSONArray(Collection, JSONParserConfiguration)","u":"%3Cinit%3E(java.util.Collection,org.json.JSONParserConfiguration)"},{"p":"org.json","c":"JSONArray","l":"JSONArray(int)","u":"%3Cinit%3E(int)"},{"p":"org.json","c":"JSONArray","l":"JSONArray(Iterable)","u":"%3Cinit%3E(java.lang.Iterable)"},{"p":"org.json","c":"JSONArray","l":"JSONArray(JSONArray)","u":"%3Cinit%3E(org.json.JSONArray)"},{"p":"org.json","c":"JSONArray","l":"JSONArray(JSONTokener)","u":"%3Cinit%3E(org.json.JSONTokener)"},{"p":"org.json","c":"JSONArray","l":"JSONArray(Object)","u":"%3Cinit%3E(java.lang.Object)"},{"p":"org.json","c":"JSONArray","l":"JSONArray(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.json","c":"JSONException","l":"JSONException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.json","c":"JSONException","l":"JSONException(String, Throwable)","u":"%3Cinit%3E(java.lang.String,java.lang.Throwable)"},{"p":"org.json","c":"JSONException","l":"JSONException(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"org.json","c":"JSONML","l":"JSONML()","u":"%3Cinit%3E()"},{"p":"org.json","c":"JSONMLParserConfiguration","l":"JSONMLParserConfiguration()","u":"%3Cinit%3E()"},{"p":"org.json","c":"JSONMLParserConfiguration","l":"JSONMLParserConfiguration(boolean, int)","u":"%3Cinit%3E(boolean,int)"},{"p":"org.json","c":"JSONObject","l":"JSONObject()","u":"%3Cinit%3E()"},{"p":"org.json","c":"JSONObject","l":"JSONObject(int)","u":"%3Cinit%3E(int)"},{"p":"org.json","c":"JSONObject","l":"JSONObject(JSONObject, String...)","u":"%3Cinit%3E(org.json.JSONObject,java.lang.String...)"},{"p":"org.json","c":"JSONObject","l":"JSONObject(JSONTokener)","u":"%3Cinit%3E(org.json.JSONTokener)"},{"p":"org.json","c":"JSONObject","l":"JSONObject(Map)","u":"%3Cinit%3E(java.util.Map)"},{"p":"org.json","c":"JSONObject","l":"JSONObject(Map, JSONParserConfiguration)","u":"%3Cinit%3E(java.util.Map,org.json.JSONParserConfiguration)"},{"p":"org.json","c":"JSONObject","l":"JSONObject(Object)","u":"%3Cinit%3E(java.lang.Object)"},{"p":"org.json","c":"JSONObject","l":"JSONObject(Object, String...)","u":"%3Cinit%3E(java.lang.Object,java.lang.String...)"},{"p":"org.json","c":"JSONObject","l":"JSONObject(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"JSONObject(String, Locale)","u":"%3Cinit%3E(java.lang.String,java.util.Locale)"},{"p":"org.json","c":"JSONParserConfiguration","l":"JSONParserConfiguration()","u":"%3Cinit%3E()"},{"p":"org.json","c":"JSONPointer","l":"JSONPointer(List)","u":"%3Cinit%3E(java.util.List)"},{"p":"org.json","c":"JSONPointer","l":"JSONPointer(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.json","c":"JSONPointerException","l":"JSONPointerException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.json","c":"JSONPointerException","l":"JSONPointerException(String, Throwable)","u":"%3Cinit%3E(java.lang.String,java.lang.Throwable)"},{"p":"org.json","c":"JSONStringer","l":"JSONStringer()","u":"%3Cinit%3E()"},{"p":"org.json","c":"JSONTokener","l":"JSONTokener(InputStream)","u":"%3Cinit%3E(java.io.InputStream)"},{"p":"org.json","c":"JSONTokener","l":"JSONTokener(Reader)","u":"%3Cinit%3E(java.io.Reader)"},{"p":"org.json","c":"JSONTokener","l":"JSONTokener(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.json","c":"JSONWriter","l":"JSONWriter(Appendable)","u":"%3Cinit%3E(java.lang.Appendable)"},{"p":"org.json","c":"JSONMLParserConfiguration","l":"KEEP_STRINGS"},{"p":"org.json","c":"XMLParserConfiguration","l":"KEEP_STRINGS"},{"p":"org.json","c":"ParserConfiguration","l":"keepStrings"},{"p":"org.json","c":"JSONWriter","l":"key(String)","u":"key(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"keys()"},{"p":"org.json","c":"JSONObject","l":"keySet()"},{"p":"org.json","c":"JSONArray","l":"length()"},{"p":"org.json","c":"JSONObject","l":"length()"},{"p":"org.json","c":"XML","l":"LT"},{"p":"org.json","c":"ParserConfiguration","l":"maxNestingDepth"},{"p":"org.json","c":"JSONWriter","l":"mode"},{"p":"org.json","c":"JSONTokener","l":"more()"},{"p":"org.json","c":"JSONObject","l":"names()"},{"p":"org.json","c":"JSONTokener","l":"next()"},{"p":"org.json","c":"JSONTokener","l":"next(char)"},{"p":"org.json","c":"JSONTokener","l":"next(int)"},{"p":"org.json","c":"XMLTokener","l":"nextCDATA()"},{"p":"org.json","c":"JSONTokener","l":"nextClean()"},{"p":"org.json","c":"XMLTokener","l":"nextContent()"},{"p":"org.json","c":"XMLTokener","l":"nextEntity(char)"},{"p":"org.json","c":"XMLTokener","l":"nextMeta()"},{"p":"org.json","c":"JSONTokener","l":"nextString(char)"},{"p":"org.json","c":"JSONTokener","l":"nextTo(char)"},{"p":"org.json","c":"JSONTokener","l":"nextTo(String)","u":"nextTo(java.lang.String)"},{"p":"org.json","c":"HTTPTokener","l":"nextToken()"},{"p":"org.json","c":"XMLTokener","l":"nextToken()"},{"p":"org.json","c":"JSONTokener","l":"nextValue()"},{"p":"org.json","c":"XML","l":"noSpace(String)","u":"noSpace(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"NULL"},{"p":"org.json","c":"XML","l":"NULL_ATTR"},{"p":"org.json","c":"JSONObject","l":"numberToString(Number)","u":"numberToString(java.lang.Number)"},{"p":"org.json","c":"JSONWriter","l":"object()"},{"p":"org.json","c":"JSONArray","l":"opt(int)"},{"p":"org.json","c":"JSONObject","l":"opt(String)","u":"opt(java.lang.String)"},{"p":"org.json","c":"JSONArray","l":"optBigDecimal(int, BigDecimal)","u":"optBigDecimal(int,java.math.BigDecimal)"},{"p":"org.json","c":"JSONObject","l":"optBigDecimal(String, BigDecimal)","u":"optBigDecimal(java.lang.String,java.math.BigDecimal)"},{"p":"org.json","c":"JSONArray","l":"optBigInteger(int, BigInteger)","u":"optBigInteger(int,java.math.BigInteger)"},{"p":"org.json","c":"JSONObject","l":"optBigInteger(String, BigInteger)","u":"optBigInteger(java.lang.String,java.math.BigInteger)"},{"p":"org.json","c":"JSONArray","l":"optBoolean(int)"},{"p":"org.json","c":"JSONArray","l":"optBoolean(int, boolean)","u":"optBoolean(int,boolean)"},{"p":"org.json","c":"JSONObject","l":"optBoolean(String)","u":"optBoolean(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optBoolean(String, boolean)","u":"optBoolean(java.lang.String,boolean)"},{"p":"org.json","c":"JSONArray","l":"optBooleanObject(int)"},{"p":"org.json","c":"JSONArray","l":"optBooleanObject(int, Boolean)","u":"optBooleanObject(int,java.lang.Boolean)"},{"p":"org.json","c":"JSONObject","l":"optBooleanObject(String)","u":"optBooleanObject(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optBooleanObject(String, Boolean)","u":"optBooleanObject(java.lang.String,java.lang.Boolean)"},{"p":"org.json","c":"JSONArray","l":"optDouble(int)"},{"p":"org.json","c":"JSONArray","l":"optDouble(int, double)","u":"optDouble(int,double)"},{"p":"org.json","c":"JSONObject","l":"optDouble(String)","u":"optDouble(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optDouble(String, double)","u":"optDouble(java.lang.String,double)"},{"p":"org.json","c":"JSONArray","l":"optDoubleObject(int)"},{"p":"org.json","c":"JSONArray","l":"optDoubleObject(int, Double)","u":"optDoubleObject(int,java.lang.Double)"},{"p":"org.json","c":"JSONObject","l":"optDoubleObject(String)","u":"optDoubleObject(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optDoubleObject(String, Double)","u":"optDoubleObject(java.lang.String,java.lang.Double)"},{"p":"org.json","c":"JSONArray","l":"optEnum(Class, int)","u":"optEnum(java.lang.Class,int)"},{"p":"org.json","c":"JSONArray","l":"optEnum(Class, int, E)","u":"optEnum(java.lang.Class,int,E)"},{"p":"org.json","c":"JSONObject","l":"optEnum(Class, String)","u":"optEnum(java.lang.Class,java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optEnum(Class, String, E)","u":"optEnum(java.lang.Class,java.lang.String,E)"},{"p":"org.json","c":"JSONArray","l":"optFloat(int)"},{"p":"org.json","c":"JSONArray","l":"optFloat(int, float)","u":"optFloat(int,float)"},{"p":"org.json","c":"JSONObject","l":"optFloat(String)","u":"optFloat(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optFloat(String, float)","u":"optFloat(java.lang.String,float)"},{"p":"org.json","c":"JSONArray","l":"optFloatObject(int)"},{"p":"org.json","c":"JSONArray","l":"optFloatObject(int, Float)","u":"optFloatObject(int,java.lang.Float)"},{"p":"org.json","c":"JSONObject","l":"optFloatObject(String)","u":"optFloatObject(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optFloatObject(String, Float)","u":"optFloatObject(java.lang.String,java.lang.Float)"},{"p":"org.json","c":"JSONArray","l":"optInt(int)"},{"p":"org.json","c":"JSONArray","l":"optInt(int, int)","u":"optInt(int,int)"},{"p":"org.json","c":"JSONObject","l":"optInt(String)","u":"optInt(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optInt(String, int)","u":"optInt(java.lang.String,int)"},{"p":"org.json","c":"JSONArray","l":"optIntegerObject(int)"},{"p":"org.json","c":"JSONArray","l":"optIntegerObject(int, Integer)","u":"optIntegerObject(int,java.lang.Integer)"},{"p":"org.json","c":"JSONObject","l":"optIntegerObject(String)","u":"optIntegerObject(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optIntegerObject(String, Integer)","u":"optIntegerObject(java.lang.String,java.lang.Integer)"},{"p":"org.json","c":"JSONArray","l":"optJSONArray(int)"},{"p":"org.json","c":"JSONArray","l":"optJSONArray(int, JSONArray)","u":"optJSONArray(int,org.json.JSONArray)"},{"p":"org.json","c":"JSONObject","l":"optJSONArray(String)","u":"optJSONArray(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optJSONArray(String, JSONArray)","u":"optJSONArray(java.lang.String,org.json.JSONArray)"},{"p":"org.json","c":"JSONArray","l":"optJSONObject(int)"},{"p":"org.json","c":"JSONArray","l":"optJSONObject(int, JSONObject)","u":"optJSONObject(int,org.json.JSONObject)"},{"p":"org.json","c":"JSONObject","l":"optJSONObject(String)","u":"optJSONObject(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optJSONObject(String, JSONObject)","u":"optJSONObject(java.lang.String,org.json.JSONObject)"},{"p":"org.json","c":"JSONArray","l":"optLong(int)"},{"p":"org.json","c":"JSONArray","l":"optLong(int, long)","u":"optLong(int,long)"},{"p":"org.json","c":"JSONObject","l":"optLong(String)","u":"optLong(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optLong(String, long)","u":"optLong(java.lang.String,long)"},{"p":"org.json","c":"JSONArray","l":"optLongObject(int)"},{"p":"org.json","c":"JSONArray","l":"optLongObject(int, Long)","u":"optLongObject(int,java.lang.Long)"},{"p":"org.json","c":"JSONObject","l":"optLongObject(String)","u":"optLongObject(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optLongObject(String, Long)","u":"optLongObject(java.lang.String,java.lang.Long)"},{"p":"org.json","c":"JSONArray","l":"optNumber(int)"},{"p":"org.json","c":"JSONArray","l":"optNumber(int, Number)","u":"optNumber(int,java.lang.Number)"},{"p":"org.json","c":"JSONObject","l":"optNumber(String)","u":"optNumber(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optNumber(String, Number)","u":"optNumber(java.lang.String,java.lang.Number)"},{"p":"org.json","c":"JSONArray","l":"optQuery(JSONPointer)","u":"optQuery(org.json.JSONPointer)"},{"p":"org.json","c":"JSONObject","l":"optQuery(JSONPointer)","u":"optQuery(org.json.JSONPointer)"},{"p":"org.json","c":"JSONArray","l":"optQuery(String)","u":"optQuery(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optQuery(String)","u":"optQuery(java.lang.String)"},{"p":"org.json","c":"JSONArray","l":"optString(int)"},{"p":"org.json","c":"JSONArray","l":"optString(int, String)","u":"optString(int,java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optString(String)","u":"optString(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"optString(String, String)","u":"optString(java.lang.String,java.lang.String)"},{"p":"org.json","c":"JSONMLParserConfiguration","l":"ORIGINAL"},{"p":"org.json","c":"XMLParserConfiguration","l":"ORIGINAL"},{"p":"org.json","c":"ParserConfiguration","l":"ParserConfiguration()","u":"%3Cinit%3E()"},{"p":"org.json","c":"ParserConfiguration","l":"ParserConfiguration(boolean, int)","u":"%3Cinit%3E(boolean,int)"},{"p":"org.json","c":"Property","l":"Property()","u":"%3Cinit%3E()"},{"p":"org.json","c":"JSONArray","l":"put(boolean)"},{"p":"org.json","c":"JSONArray","l":"put(Collection)","u":"put(java.util.Collection)"},{"p":"org.json","c":"JSONArray","l":"put(double)"},{"p":"org.json","c":"JSONArray","l":"put(float)"},{"p":"org.json","c":"JSONArray","l":"put(int)"},{"p":"org.json","c":"JSONArray","l":"put(int, boolean)","u":"put(int,boolean)"},{"p":"org.json","c":"JSONArray","l":"put(int, Collection)","u":"put(int,java.util.Collection)"},{"p":"org.json","c":"JSONArray","l":"put(int, double)","u":"put(int,double)"},{"p":"org.json","c":"JSONArray","l":"put(int, float)","u":"put(int,float)"},{"p":"org.json","c":"JSONArray","l":"put(int, int)","u":"put(int,int)"},{"p":"org.json","c":"JSONArray","l":"put(int, long)","u":"put(int,long)"},{"p":"org.json","c":"JSONArray","l":"put(int, Map)","u":"put(int,java.util.Map)"},{"p":"org.json","c":"JSONArray","l":"put(int, Map, JSONParserConfiguration)","u":"put(int,java.util.Map,org.json.JSONParserConfiguration)"},{"p":"org.json","c":"JSONArray","l":"put(int, Object)","u":"put(int,java.lang.Object)"},{"p":"org.json","c":"JSONArray","l":"put(long)"},{"p":"org.json","c":"JSONArray","l":"put(Map)","u":"put(java.util.Map)"},{"p":"org.json","c":"JSONArray","l":"put(Object)","u":"put(java.lang.Object)"},{"p":"org.json","c":"JSONObject","l":"put(String, boolean)","u":"put(java.lang.String,boolean)"},{"p":"org.json","c":"JSONObject","l":"put(String, Collection)","u":"put(java.lang.String,java.util.Collection)"},{"p":"org.json","c":"JSONObject","l":"put(String, double)","u":"put(java.lang.String,double)"},{"p":"org.json","c":"JSONObject","l":"put(String, float)","u":"put(java.lang.String,float)"},{"p":"org.json","c":"JSONObject","l":"put(String, int)","u":"put(java.lang.String,int)"},{"p":"org.json","c":"JSONObject","l":"put(String, long)","u":"put(java.lang.String,long)"},{"p":"org.json","c":"JSONObject","l":"put(String, Map)","u":"put(java.lang.String,java.util.Map)"},{"p":"org.json","c":"JSONObject","l":"put(String, Object)","u":"put(java.lang.String,java.lang.Object)"},{"p":"org.json","c":"JSONArray","l":"putAll(Collection)","u":"putAll(java.util.Collection)"},{"p":"org.json","c":"JSONArray","l":"putAll(Iterable)","u":"putAll(java.lang.Iterable)"},{"p":"org.json","c":"JSONArray","l":"putAll(JSONArray)","u":"putAll(org.json.JSONArray)"},{"p":"org.json","c":"JSONArray","l":"putAll(Object)","u":"putAll(java.lang.Object)"},{"p":"org.json","c":"JSONObject","l":"putOnce(String, Object)","u":"putOnce(java.lang.String,java.lang.Object)"},{"p":"org.json","c":"JSONObject","l":"putOpt(String, Object)","u":"putOpt(java.lang.String,java.lang.Object)"},{"p":"org.json","c":"JSONArray","l":"query(JSONPointer)","u":"query(org.json.JSONPointer)"},{"p":"org.json","c":"JSONObject","l":"query(JSONPointer)","u":"query(org.json.JSONPointer)"},{"p":"org.json","c":"JSONArray","l":"query(String)","u":"query(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"query(String)","u":"query(java.lang.String)"},{"p":"org.json","c":"JSONPointer","l":"queryFrom(Object)","u":"queryFrom(java.lang.Object)"},{"p":"org.json","c":"XML","l":"QUEST"},{"p":"org.json","c":"XML","l":"QUOT"},{"p":"org.json","c":"JSONObject","l":"quote(String)","u":"quote(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"quote(String, Writer)","u":"quote(java.lang.String,java.io.Writer)"},{"p":"org.json","c":"JSONArray","l":"remove(int)"},{"p":"org.json","c":"JSONObject","l":"remove(String)","u":"remove(java.lang.String)"},{"p":"org.json","c":"CDL","l":"rowToJSONArray(JSONTokener)","u":"rowToJSONArray(org.json.JSONTokener)"},{"p":"org.json","c":"CDL","l":"rowToJSONArray(JSONTokener, char)","u":"rowToJSONArray(org.json.JSONTokener,char)"},{"p":"org.json","c":"CDL","l":"rowToJSONObject(JSONArray, JSONTokener)","u":"rowToJSONObject(org.json.JSONArray,org.json.JSONTokener)"},{"p":"org.json","c":"CDL","l":"rowToJSONObject(JSONArray, JSONTokener, char)","u":"rowToJSONObject(org.json.JSONArray,org.json.JSONTokener,char)"},{"p":"org.json","c":"CDL","l":"rowToString(JSONArray)","u":"rowToString(org.json.JSONArray)"},{"p":"org.json","c":"CDL","l":"rowToString(JSONArray, char)","u":"rowToString(org.json.JSONArray,char)"},{"p":"org.json","c":"XMLParserConfiguration","l":"shouldTrimWhiteSpace()"},{"p":"org.json","c":"JSONArray","l":"similar(Object)","u":"similar(java.lang.Object)"},{"p":"org.json","c":"JSONObject","l":"similar(Object)","u":"similar(java.lang.Object)"},{"p":"org.json","c":"XMLTokener","l":"skipPast(String)","u":"skipPast(java.lang.String)"},{"p":"org.json","c":"JSONTokener","l":"skipTo(char)"},{"p":"org.json","c":"XML","l":"SLASH"},{"p":"org.json","c":"JSONObject","l":"stringToNumber(String)","u":"stringToNumber(java.lang.String)"},{"p":"org.json","c":"JSONObject","l":"stringToValue(String)","u":"stringToValue(java.lang.String)"},{"p":"org.json","c":"XML","l":"stringToValue(String)","u":"stringToValue(java.lang.String)"},{"p":"org.json","c":"XML","l":"stringToValue(String, XMLXsiTypeConverter)","u":"stringToValue(java.lang.String,org.json.XMLXsiTypeConverter)"},{"p":"org.json","c":"JSONTokener","l":"syntaxError(String)","u":"syntaxError(java.lang.String)"},{"p":"org.json","c":"JSONTokener","l":"syntaxError(String, Throwable)","u":"syntaxError(java.lang.String,java.lang.Throwable)"},{"p":"org.json","c":"JSONObject","l":"testValidity(Object)","u":"testValidity(java.lang.Object)"},{"p":"org.json","c":"JSONObject","l":"toJSONArray(JSONArray)","u":"toJSONArray(org.json.JSONArray)"},{"p":"org.json","c":"CDL","l":"toJSONArray(JSONArray, JSONTokener)","u":"toJSONArray(org.json.JSONArray,org.json.JSONTokener)"},{"p":"org.json","c":"CDL","l":"toJSONArray(JSONArray, JSONTokener, char)","u":"toJSONArray(org.json.JSONArray,org.json.JSONTokener,char)"},{"p":"org.json","c":"CDL","l":"toJSONArray(JSONArray, String)","u":"toJSONArray(org.json.JSONArray,java.lang.String)"},{"p":"org.json","c":"CDL","l":"toJSONArray(JSONArray, String, char)","u":"toJSONArray(org.json.JSONArray,java.lang.String,char)"},{"p":"org.json","c":"CDL","l":"toJSONArray(JSONTokener)","u":"toJSONArray(org.json.JSONTokener)"},{"p":"org.json","c":"CDL","l":"toJSONArray(JSONTokener, char)","u":"toJSONArray(org.json.JSONTokener,char)"},{"p":"org.json","c":"CDL","l":"toJSONArray(String)","u":"toJSONArray(java.lang.String)"},{"p":"org.json","c":"JSONML","l":"toJSONArray(String)","u":"toJSONArray(java.lang.String)"},{"p":"org.json","c":"JSONML","l":"toJSONArray(String, boolean)","u":"toJSONArray(java.lang.String,boolean)"},{"p":"org.json","c":"CDL","l":"toJSONArray(String, char)","u":"toJSONArray(java.lang.String,char)"},{"p":"org.json","c":"JSONML","l":"toJSONArray(String, JSONMLParserConfiguration)","u":"toJSONArray(java.lang.String,org.json.JSONMLParserConfiguration)"},{"p":"org.json","c":"JSONML","l":"toJSONArray(XMLTokener)","u":"toJSONArray(org.json.XMLTokener)"},{"p":"org.json","c":"JSONML","l":"toJSONArray(XMLTokener, boolean)","u":"toJSONArray(org.json.XMLTokener,boolean)"},{"p":"org.json","c":"JSONML","l":"toJSONArray(XMLTokener, JSONMLParserConfiguration)","u":"toJSONArray(org.json.XMLTokener,org.json.JSONMLParserConfiguration)"},{"p":"org.json","c":"JSONArray","l":"toJSONObject(JSONArray)","u":"toJSONObject(org.json.JSONArray)"},{"p":"org.json","c":"Property","l":"toJSONObject(Properties)","u":"toJSONObject(java.util.Properties)"},{"p":"org.json","c":"XML","l":"toJSONObject(Reader)","u":"toJSONObject(java.io.Reader)"},{"p":"org.json","c":"XML","l":"toJSONObject(Reader, boolean)","u":"toJSONObject(java.io.Reader,boolean)"},{"p":"org.json","c":"XML","l":"toJSONObject(Reader, XMLParserConfiguration)","u":"toJSONObject(java.io.Reader,org.json.XMLParserConfiguration)"},{"p":"org.json","c":"Cookie","l":"toJSONObject(String)","u":"toJSONObject(java.lang.String)"},{"p":"org.json","c":"CookieList","l":"toJSONObject(String)","u":"toJSONObject(java.lang.String)"},{"p":"org.json","c":"HTTP","l":"toJSONObject(String)","u":"toJSONObject(java.lang.String)"},{"p":"org.json","c":"JSONML","l":"toJSONObject(String)","u":"toJSONObject(java.lang.String)"},{"p":"org.json","c":"XML","l":"toJSONObject(String)","u":"toJSONObject(java.lang.String)"},{"p":"org.json","c":"JSONML","l":"toJSONObject(String, boolean)","u":"toJSONObject(java.lang.String,boolean)"},{"p":"org.json","c":"XML","l":"toJSONObject(String, boolean)","u":"toJSONObject(java.lang.String,boolean)"},{"p":"org.json","c":"JSONML","l":"toJSONObject(String, JSONMLParserConfiguration)","u":"toJSONObject(java.lang.String,org.json.JSONMLParserConfiguration)"},{"p":"org.json","c":"XML","l":"toJSONObject(String, XMLParserConfiguration)","u":"toJSONObject(java.lang.String,org.json.XMLParserConfiguration)"},{"p":"org.json","c":"JSONML","l":"toJSONObject(XMLTokener)","u":"toJSONObject(org.json.XMLTokener)"},{"p":"org.json","c":"JSONML","l":"toJSONObject(XMLTokener, boolean)","u":"toJSONObject(org.json.XMLTokener,boolean)"},{"p":"org.json","c":"JSONML","l":"toJSONObject(XMLTokener, JSONMLParserConfiguration)","u":"toJSONObject(org.json.XMLTokener,org.json.JSONMLParserConfiguration)"},{"p":"org.json","c":"JSONString","l":"toJSONString()"},{"p":"org.json","c":"JSONArray","l":"toList()"},{"p":"org.json","c":"JSONObject","l":"toMap()"},{"p":"org.json","c":"Property","l":"toProperties(JSONObject)","u":"toProperties(org.json.JSONObject)"},{"p":"org.json","c":"JSONArray","l":"toString()"},{"p":"org.json","c":"JSONObject","l":"toString()"},{"p":"org.json","c":"JSONPointer","l":"toString()"},{"p":"org.json","c":"JSONStringer","l":"toString()"},{"p":"org.json","c":"JSONTokener","l":"toString()"},{"p":"org.json","c":"JSONArray","l":"toString(int)"},{"p":"org.json","c":"JSONObject","l":"toString(int)"},{"p":"org.json","c":"CDL","l":"toString(JSONArray)","u":"toString(org.json.JSONArray)"},{"p":"org.json","c":"JSONML","l":"toString(JSONArray)","u":"toString(org.json.JSONArray)"},{"p":"org.json","c":"CDL","l":"toString(JSONArray, char)","u":"toString(org.json.JSONArray,char)"},{"p":"org.json","c":"CDL","l":"toString(JSONArray, JSONArray)","u":"toString(org.json.JSONArray,org.json.JSONArray)"},{"p":"org.json","c":"CDL","l":"toString(JSONArray, JSONArray, char)","u":"toString(org.json.JSONArray,org.json.JSONArray,char)"},{"p":"org.json","c":"Cookie","l":"toString(JSONObject)","u":"toString(org.json.JSONObject)"},{"p":"org.json","c":"CookieList","l":"toString(JSONObject)","u":"toString(org.json.JSONObject)"},{"p":"org.json","c":"HTTP","l":"toString(JSONObject)","u":"toString(org.json.JSONObject)"},{"p":"org.json","c":"JSONML","l":"toString(JSONObject)","u":"toString(org.json.JSONObject)"},{"p":"org.json","c":"XML","l":"toString(Object)","u":"toString(java.lang.Object)"},{"p":"org.json","c":"XML","l":"toString(Object, int)","u":"toString(java.lang.Object,int)"},{"p":"org.json","c":"XML","l":"toString(Object, String)","u":"toString(java.lang.Object,java.lang.String)"},{"p":"org.json","c":"XML","l":"toString(Object, String, int)","u":"toString(java.lang.Object,java.lang.String,int)"},{"p":"org.json","c":"XML","l":"toString(Object, String, XMLParserConfiguration)","u":"toString(java.lang.Object,java.lang.String,org.json.XMLParserConfiguration)"},{"p":"org.json","c":"XML","l":"toString(Object, String, XMLParserConfiguration, int)","u":"toString(java.lang.Object,java.lang.String,org.json.XMLParserConfiguration,int)"},{"p":"org.json","c":"JSONPointer","l":"toURIFragment()"},{"p":"org.json","c":"XML","l":"TYPE_ATTR"},{"p":"org.json","c":"ParserConfiguration","l":"UNDEFINED_MAXIMUM_NESTING_DEPTH"},{"p":"org.json","c":"Cookie","l":"unescape(String)","u":"unescape(java.lang.String)"},{"p":"org.json","c":"XML","l":"unescape(String)","u":"unescape(java.lang.String)"},{"p":"org.json","c":"JSONPropertyName","l":"value()"},{"p":"org.json","c":"JSONWriter","l":"value(boolean)"},{"p":"org.json","c":"JSONWriter","l":"value(double)"},{"p":"org.json","c":"JSONWriter","l":"value(long)"},{"p":"org.json","c":"JSONWriter","l":"value(Object)","u":"value(java.lang.Object)"},{"p":"org.json","c":"JSONObject","l":"valueToString(Object)","u":"valueToString(java.lang.Object)"},{"p":"org.json","c":"JSONWriter","l":"valueToString(Object)","u":"valueToString(java.lang.Object)"},{"p":"org.json","c":"XMLParserConfiguration","l":"withcDataTagName(String)","u":"withcDataTagName(java.lang.String)"},{"p":"org.json","c":"XMLParserConfiguration","l":"withCloseEmptyTag(boolean)"},{"p":"org.json","c":"XMLParserConfiguration","l":"withConvertNilAttributeToNull(boolean)"},{"p":"org.json","c":"XMLParserConfiguration","l":"withForceList(Set)","u":"withForceList(java.util.Set)"},{"p":"org.json","c":"JSONMLParserConfiguration","l":"withKeepStrings(boolean)"},{"p":"org.json","c":"ParserConfiguration","l":"withKeepStrings(boolean)"},{"p":"org.json","c":"XMLParserConfiguration","l":"withKeepStrings(boolean)"},{"p":"org.json","c":"JSONMLParserConfiguration","l":"withMaxNestingDepth(int)"},{"p":"org.json","c":"JSONParserConfiguration","l":"withMaxNestingDepth(int)"},{"p":"org.json","c":"ParserConfiguration","l":"withMaxNestingDepth(int)"},{"p":"org.json","c":"XMLParserConfiguration","l":"withMaxNestingDepth(int)"},{"p":"org.json","c":"XMLParserConfiguration","l":"withShouldTrimWhitespace(boolean)"},{"p":"org.json","c":"XMLParserConfiguration","l":"withXsiTypeMap(Map>)","u":"withXsiTypeMap(java.util.Map)"},{"p":"org.json","c":"JSONObject","l":"wrap(Object)","u":"wrap(java.lang.Object)"},{"p":"org.json","c":"JSONArray","l":"write(Writer)","u":"write(java.io.Writer)"},{"p":"org.json","c":"JSONObject","l":"write(Writer)","u":"write(java.io.Writer)"},{"p":"org.json","c":"JSONArray","l":"write(Writer, int, int)","u":"write(java.io.Writer,int,int)"},{"p":"org.json","c":"JSONObject","l":"write(Writer, int, int)","u":"write(java.io.Writer,int,int)"},{"p":"org.json","c":"JSONWriter","l":"writer"},{"p":"org.json","c":"XML","l":"XML()","u":"%3Cinit%3E()"},{"p":"org.json","c":"XMLParserConfiguration","l":"XMLParserConfiguration()","u":"%3Cinit%3E()"},{"p":"org.json","c":"XMLParserConfiguration","l":"XMLParserConfiguration(boolean)","u":"%3Cinit%3E(boolean)"},{"p":"org.json","c":"XMLParserConfiguration","l":"XMLParserConfiguration(boolean, String)","u":"%3Cinit%3E(boolean,java.lang.String)"},{"p":"org.json","c":"XMLParserConfiguration","l":"XMLParserConfiguration(boolean, String, boolean)","u":"%3Cinit%3E(boolean,java.lang.String,boolean)"},{"p":"org.json","c":"XMLParserConfiguration","l":"XMLParserConfiguration(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.json","c":"XMLTokener","l":"XMLTokener(Reader)","u":"%3Cinit%3E(java.io.Reader)"},{"p":"org.json","c":"XMLTokener","l":"XMLTokener(Reader, XMLParserConfiguration)","u":"%3Cinit%3E(java.io.Reader,org.json.XMLParserConfiguration)"},{"p":"org.json","c":"XMLTokener","l":"XMLTokener(String)","u":"%3Cinit%3E(java.lang.String)"}];updateSearchResults(); \ No newline at end of file diff --git a/src/main/java/JSON-Java/module-search-index.js b/src/main/java/JSON-Java/module-search-index.js new file mode 100644 index 0000000..0d59754 --- /dev/null +++ b/src/main/java/JSON-Java/module-search-index.js @@ -0,0 +1 @@ +moduleSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/src/main/java/JSON-Java/org/json/CDL.html b/src/main/java/JSON-Java/org/json/CDL.html new file mode 100644 index 0000000..ab7efa4 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/CDL.html @@ -0,0 +1,628 @@ + + + + +CDL + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class CDL

+
+
java.lang.Object +
org.json.CDL
+
+
+
+
public class CDL +extends Object
+
This provides static methods to convert comma (or otherwise) delimited text into a + JSONArray, and to convert a JSONArray into comma (or otherwise) delimited text. Comma + delimited text is a very popular format for data interchange. It is + understood by most database, spreadsheet, and organizer programs. +

+ Each row of text represents a row in a table or a data record. Each row + ends with a NEWLINE character. Each row contains one or more values. + Values are separated by commas. A value can contain any character except + for comma, unless it is wrapped in single quotes or double quotes. +

+ The first row usually contains the names of the columns. +

+ A comma delimited list can be converted into a JSONArray of JSONObjects. + The names for the elements in the JSONObjects can be taken from the names + in the first row.

+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    CDL()
    +
    +
    Constructs a new CDL object.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static JSONArray
    + +
    +
    Produce a JSONArray of strings from a row of comma delimited values.
    +
    +
    static JSONArray
    +
    rowToJSONArray(JSONTokener x, + char delimiter)
    +
    +
    Produce a JSONArray of strings from a row of comma delimited values.
    +
    +
    static JSONObject
    + +
    +
    Produce a JSONObject from a row of comma delimited text, using a + parallel JSONArray of strings to provides the names of the elements.
    +
    +
    static JSONObject
    +
    rowToJSONObject(JSONArray names, + JSONTokener x, + char delimiter)
    +
    +
    Produce a JSONObject from a row of comma delimited text, using a + parallel JSONArray of strings to provides the names of the elements.
    +
    +
    static String
    + +
    +
    Produce a comma delimited text row from a JSONArray.
    +
    +
    static String
    +
    rowToString(JSONArray ja, + char delimiter)
    +
    +
    Produce a comma delimited text row from a JSONArray.
    +
    +
    static JSONArray
    + +
    +
    Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
    +
    +
    static JSONArray
    +
    toJSONArray(String string, + char delimiter)
    +
    +
    Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
    +
    +
    static JSONArray
    +
    toJSONArray(JSONArray names, + String string)
    +
    +
    Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
    +
    +
    static JSONArray
    +
    toJSONArray(JSONArray names, + String string, + char delimiter)
    +
    +
    Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
    +
    +
    static JSONArray
    + +
    +
    Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
    +
    +
    static JSONArray
    +
    toJSONArray(JSONArray names, + JSONTokener x, + char delimiter)
    +
    +
    Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
    +
    +
    static JSONArray
    + +
    +
    Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
    +
    +
    static JSONArray
    +
    toJSONArray(JSONTokener x, + char delimiter)
    +
    +
    Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
    +
    +
    static String
    + +
    +
    Produce a comma delimited text from a JSONArray of JSONObjects.
    +
    +
    static String
    +
    toString(JSONArray ja, + char delimiter)
    +
    +
    Produce a comma delimited text from a JSONArray of JSONObjects.
    +
    +
    static String
    + +
    +
    Produce a comma delimited text from a JSONArray of JSONObjects using + a provided list of names.
    +
    +
    static String
    +
    toString(JSONArray names, + JSONArray ja, + char delimiter)
    +
    +
    Produce a comma delimited text from a JSONArray of JSONObjects using + a provided list of names.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CDL

      +
      public CDL()
      +
      Constructs a new CDL object.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      rowToJSONArray

      +
      public static JSONArray rowToJSONArray(JSONTokener x) + throws JSONException
      +
      Produce a JSONArray of strings from a row of comma delimited values.
      +
      +
      Parameters:
      +
      x - A JSONTokener of the source text.
      +
      Returns:
      +
      A JSONArray of strings.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      rowToJSONArray

      +
      public static JSONArray rowToJSONArray(JSONTokener x, + char delimiter) + throws JSONException
      +
      Produce a JSONArray of strings from a row of comma delimited values.
      +
      +
      Parameters:
      +
      x - A JSONTokener of the source text.
      +
      delimiter - custom delimiter char
      +
      Returns:
      +
      A JSONArray of strings.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      rowToJSONObject

      +
      public static JSONObject rowToJSONObject(JSONArray names, + JSONTokener x) + throws JSONException
      +
      Produce a JSONObject from a row of comma delimited text, using a + parallel JSONArray of strings to provides the names of the elements.
      +
      +
      Parameters:
      +
      names - A JSONArray of names. This is commonly obtained from the + first row of a comma delimited text file using the rowToJSONArray + method.
      +
      x - A JSONTokener of the source text.
      +
      Returns:
      +
      A JSONObject combining the names and values.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      rowToJSONObject

      +
      public static JSONObject rowToJSONObject(JSONArray names, + JSONTokener x, + char delimiter) + throws JSONException
      +
      Produce a JSONObject from a row of comma delimited text, using a + parallel JSONArray of strings to provides the names of the elements.
      +
      +
      Parameters:
      +
      names - A JSONArray of names. This is commonly obtained from the + first row of a comma delimited text file using the rowToJSONArray + method.
      +
      x - A JSONTokener of the source text.
      +
      delimiter - custom delimiter char
      +
      Returns:
      +
      A JSONObject combining the names and values.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      rowToString

      +
      public static String rowToString(JSONArray ja)
      +
      Produce a comma delimited text row from a JSONArray. Values containing + the comma character will be quoted. Troublesome characters may be + removed.
      +
      +
      Parameters:
      +
      ja - A JSONArray of strings.
      +
      Returns:
      +
      A string ending in NEWLINE.
      +
      +
      +
    • +
    • +
      +

      rowToString

      +
      public static String rowToString(JSONArray ja, + char delimiter)
      +
      Produce a comma delimited text row from a JSONArray. Values containing + the comma character will be quoted. Troublesome characters may be + removed.
      +
      +
      Parameters:
      +
      ja - A JSONArray of strings.
      +
      delimiter - custom delimiter char
      +
      Returns:
      +
      A string ending in NEWLINE.
      +
      +
      +
    • +
    • +
      +

      toJSONArray

      +
      public static JSONArray toJSONArray(String string) + throws JSONException
      +
      Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
      +
      +
      Parameters:
      +
      string - The comma delimited text.
      +
      Returns:
      +
      A JSONArray of JSONObjects.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      toJSONArray

      +
      public static JSONArray toJSONArray(String string, + char delimiter) + throws JSONException
      +
      Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
      +
      +
      Parameters:
      +
      string - The comma delimited text.
      +
      delimiter - custom delimiter char
      +
      Returns:
      +
      A JSONArray of JSONObjects.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      toJSONArray

      +
      public static JSONArray toJSONArray(JSONTokener x) + throws JSONException
      +
      Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
      +
      +
      Parameters:
      +
      x - The JSONTokener containing the comma delimited text.
      +
      Returns:
      +
      A JSONArray of JSONObjects.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      toJSONArray

      +
      public static JSONArray toJSONArray(JSONTokener x, + char delimiter) + throws JSONException
      +
      Produce a JSONArray of JSONObjects from a comma delimited text string, + using the first row as a source of names.
      +
      +
      Parameters:
      +
      x - The JSONTokener containing the comma delimited text.
      +
      delimiter - custom delimiter char
      +
      Returns:
      +
      A JSONArray of JSONObjects.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      toJSONArray

      +
      public static JSONArray toJSONArray(JSONArray names, + String string) + throws JSONException
      +
      Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
      +
      +
      Parameters:
      +
      names - A JSONArray of strings.
      +
      string - The comma delimited text.
      +
      Returns:
      +
      A JSONArray of JSONObjects.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      toJSONArray

      +
      public static JSONArray toJSONArray(JSONArray names, + String string, + char delimiter) + throws JSONException
      +
      Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
      +
      +
      Parameters:
      +
      names - A JSONArray of strings.
      +
      string - The comma delimited text.
      +
      delimiter - custom delimiter char
      +
      Returns:
      +
      A JSONArray of JSONObjects.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      toJSONArray

      +
      public static JSONArray toJSONArray(JSONArray names, + JSONTokener x) + throws JSONException
      +
      Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
      +
      +
      Parameters:
      +
      names - A JSONArray of strings.
      +
      x - A JSONTokener of the source text.
      +
      Returns:
      +
      A JSONArray of JSONObjects.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      toJSONArray

      +
      public static JSONArray toJSONArray(JSONArray names, + JSONTokener x, + char delimiter) + throws JSONException
      +
      Produce a JSONArray of JSONObjects from a comma delimited text string + using a supplied JSONArray as the source of element names.
      +
      +
      Parameters:
      +
      names - A JSONArray of strings.
      +
      x - A JSONTokener of the source text.
      +
      delimiter - custom delimiter char
      +
      Returns:
      +
      A JSONArray of JSONObjects.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public static String toString(JSONArray ja) + throws JSONException
      +
      Produce a comma delimited text from a JSONArray of JSONObjects. The + first row will be a list of names obtained by inspecting the first + JSONObject.
      +
      +
      Parameters:
      +
      ja - A JSONArray of JSONObjects.
      +
      Returns:
      +
      A comma delimited text.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public static String toString(JSONArray ja, + char delimiter) + throws JSONException
      +
      Produce a comma delimited text from a JSONArray of JSONObjects. The + first row will be a list of names obtained by inspecting the first + JSONObject.
      +
      +
      Parameters:
      +
      ja - A JSONArray of JSONObjects.
      +
      delimiter - custom delimiter char
      +
      Returns:
      +
      A comma delimited text.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public static String toString(JSONArray names, + JSONArray ja) + throws JSONException
      +
      Produce a comma delimited text from a JSONArray of JSONObjects using + a provided list of names. The list of names is not included in the + output.
      +
      +
      Parameters:
      +
      names - A JSONArray of strings.
      +
      ja - A JSONArray of JSONObjects.
      +
      Returns:
      +
      A comma delimited text.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public static String toString(JSONArray names, + JSONArray ja, + char delimiter) + throws JSONException
      +
      Produce a comma delimited text from a JSONArray of JSONObjects using + a provided list of names. The list of names is not included in the + output.
      +
      +
      Parameters:
      +
      names - A JSONArray of strings.
      +
      ja - A JSONArray of JSONObjects.
      +
      delimiter - custom delimiter char
      +
      Returns:
      +
      A comma delimited text.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/Cookie.html b/src/main/java/JSON-Java/org/json/Cookie.html new file mode 100644 index 0000000..87ffe0e --- /dev/null +++ b/src/main/java/JSON-Java/org/json/Cookie.html @@ -0,0 +1,263 @@ + + + + +Cookie + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class Cookie

+
+
java.lang.Object +
org.json.Cookie
+
+
+
+
public class Cookie +extends Object
+
Convert a web browser cookie specification to a JSONObject and back. + JSON and Cookies are both notations for name/value pairs. + See also: https://tools.ietf.org/html/rfc6265
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Constructs a new Cookie object.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static String
    +
    escape(String string)
    +
    +
    Produce a copy of a string in which the characters '+', '%', '=', ';' + and control characters are replaced with "%hh".
    +
    +
    static JSONObject
    + +
    +
    Convert a cookie specification string into a JSONObject.
    +
    +
    static String
    + +
    +
    Convert a JSONObject into a cookie specification string.
    +
    +
    static String
    +
    unescape(String string)
    +
    +
    Convert %hh sequences to single characters, and + convert plus to space.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Cookie

      +
      public Cookie()
      +
      Constructs a new Cookie object.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      escape

      +
      public static String escape(String string)
      +
      Produce a copy of a string in which the characters '+', '%', '=', ';' + and control characters are replaced with "%hh". This is a gentle form + of URL encoding, attempting to cause as little distortion to the + string as possible. The characters '=' and ';' are meta characters in + cookies. By convention, they are escaped using the URL-encoding. This is + only a convention, not a standard. Often, cookies are expected to have + encoded values. We encode '=' and ';' because we must. We encode '%' and + '+' because they are meta characters in URL encoding.
      +
      +
      Parameters:
      +
      string - The source string.
      +
      Returns:
      +
      The escaped result.
      +
      +
      +
    • +
    • +
      +

      toJSONObject

      +
      public static JSONObject toJSONObject(String string)
      +
      Convert a cookie specification string into a JSONObject. The string + must contain a name value pair separated by '='. The name and the value + will be unescaped, possibly converting '+' and '%' sequences. The + cookie properties may follow, separated by ';', also represented as + name=value (except the Attribute properties like "Secure" or "HttpOnly", + which do not have a value. The value Boolean.TRUE will be used for these). + The name will be stored under the key "name", and the value will be + stored under the key "value". This method does not do checking or + validation of the parameters. It only converts the cookie string into + a JSONObject. All attribute names are converted to lower case keys in the + JSONObject (HttpOnly => httponly). If an attribute is specified more than + once, only the value found closer to the end of the cookie-string is kept.
      +
      +
      Parameters:
      +
      string - The cookie specification string.
      +
      Returns:
      +
      A JSONObject containing "name", "value", and possibly other + members.
      +
      Throws:
      +
      JSONException - If there is an error parsing the Cookie String. + Cookie strings must have at least one '=' character and the 'name' + portion of the cookie must not be blank.
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public static String toString(JSONObject jo) + throws JSONException
      +
      Convert a JSONObject into a cookie specification string. The JSONObject + must contain "name" and "value" members (case insensitive). + If the JSONObject contains other members, they will be appended to the cookie + specification string. User-Agents are instructed to ignore unknown attributes, + so ensure your JSONObject is using only known attributes. + See also: https://tools.ietf.org/html/rfc6265
      +
      +
      Parameters:
      +
      jo - A JSONObject
      +
      Returns:
      +
      A cookie specification string
      +
      Throws:
      +
      JSONException - thrown if the cookie has no name.
      +
      +
      +
    • +
    • +
      +

      unescape

      +
      public static String unescape(String string)
      +
      Convert %hh sequences to single characters, and + convert plus to space.
      +
      +
      Parameters:
      +
      string - A string that may contain + + (plus) and + %hh sequences.
      +
      Returns:
      +
      The unescaped string.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/CookieList.html b/src/main/java/JSON-Java/org/json/CookieList.html new file mode 100644 index 0000000..56941fb --- /dev/null +++ b/src/main/java/JSON-Java/org/json/CookieList.html @@ -0,0 +1,205 @@ + + + + +CookieList + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class CookieList

+
+
java.lang.Object +
org.json.CookieList
+
+
+
+
public class CookieList +extends Object
+
Convert a web browser cookie list string to a JSONObject and back.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CookieList

      +
      public CookieList()
      +
      Constructs a new CookieList object.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toJSONObject

      +
      public static JSONObject toJSONObject(String string) + throws JSONException
      +
      Convert a cookie list into a JSONObject. A cookie list is a sequence + of name/value pairs. The names are separated from the values by '='. + The pairs are separated by ';'. The names and the values + will be unescaped, possibly converting '+' and '%' sequences. + + To add a cookie to a cookie list, + cookielistJSONObject.put(cookieJSONObject.getString("name"), + cookieJSONObject.getString("value"));
      +
      +
      Parameters:
      +
      string - A cookie list string
      +
      Returns:
      +
      A JSONObject
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public static String toString(JSONObject jo) + throws JSONException
      +
      Convert a JSONObject into a cookie list. A cookie list is a sequence + of name/value pairs. The names are separated from the values by '='. + The pairs are separated by ';'. The characters '%', '+', '=', and ';' + in the names and values are replaced by "%hh".
      +
      +
      Parameters:
      +
      jo - A JSONObject
      +
      Returns:
      +
      A cookie list string
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/HTTP.html b/src/main/java/JSON-Java/org/json/HTTP.html new file mode 100644 index 0000000..68e9fe1 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/HTTP.html @@ -0,0 +1,275 @@ + + + + +HTTP + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class HTTP

+
+
java.lang.Object +
org.json.HTTP
+
+
+
+
public class HTTP +extends Object
+
Convert an HTTP header to a JSONObject and back.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      HTTP

      +
      public HTTP()
      +
      Constructs a new HTTP object.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toJSONObject

      +
      public static JSONObject toJSONObject(String string) + throws JSONException
      +
      Convert an HTTP header string into a JSONObject. It can be a request + header or a response header. A request header will contain +
      {
      +    Method: "POST" (for example),
      +    "Request-URI": "/" (for example),
      +    "HTTP-Version": "HTTP/1.1" (for example)
      + }
      + A response header will contain +
      {
      +    "HTTP-Version": "HTTP/1.1" (for example),
      +    "Status-Code": "200" (for example),
      +    "Reason-Phrase": "OK" (for example)
      + }
      + In addition, the other parameters in the header will be captured, using + the HTTP field names as JSON names, so that
      
      +    Date: Sun, 26 May 2002 18:06:04 GMT
      +    Cookie: Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s
      +    Cache-Control: no-cache
      + become +
      
      +    Date: "Sun, 26 May 2002 18:06:04 GMT",
      +    Cookie: "Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s",
      +    "Cache-Control": "no-cache",
      + ...
      + It does no further checking or conversion. It does not parse dates. + It does not do '%' transforms on URLs.
      +
      +
      Parameters:
      +
      string - An HTTP header string.
      +
      Returns:
      +
      A JSONObject containing the elements and attributes + of the XML string.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public static String toString(JSONObject jo) + throws JSONException
      +
      Convert a JSONObject into an HTTP header. A request header must contain +
      {
      +    Method: "POST" (for example),
      +    "Request-URI": "/" (for example),
      +    "HTTP-Version": "HTTP/1.1" (for example)
      + }
      + A response header must contain +
      {
      +    "HTTP-Version": "HTTP/1.1" (for example),
      +    "Status-Code": "200" (for example),
      +    "Reason-Phrase": "OK" (for example)
      + }
      + Any other members of the JSONObject will be output as HTTP fields. + The result will end with two CRLF pairs.
      +
      +
      Parameters:
      +
      jo - A JSONObject
      +
      Returns:
      +
      An HTTP header string.
      +
      Throws:
      +
      JSONException - if the object does not contain enough + information.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/HTTPTokener.html b/src/main/java/JSON-Java/org/json/HTTPTokener.html new file mode 100644 index 0000000..db319aa --- /dev/null +++ b/src/main/java/JSON-Java/org/json/HTTPTokener.html @@ -0,0 +1,182 @@ + + + + +HTTPTokener + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class HTTPTokener

+
+
java.lang.Object +
org.json.JSONTokener +
org.json.HTTPTokener
+
+
+
+
+
public class HTTPTokener +extends JSONTokener
+
The HTTPTokener extends the JSONTokener to provide additional methods + for the parsing of HTTP headers.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      HTTPTokener

      +
      public HTTPTokener(String string)
      +
      Construct an HTTPTokener from a string.
      +
      +
      Parameters:
      +
      string - A source string.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      nextToken

      +
      public String nextToken() + throws JSONException
      +
      Get the next token or string. This is used in parsing HTTP headers.
      +
      +
      Returns:
      +
      A String.
      +
      Throws:
      +
      JSONException - if a syntax error occurs
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/JSONArray.html b/src/main/java/JSON-Java/org/json/JSONArray.html new file mode 100644 index 0000000..1827636 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/JSONArray.html @@ -0,0 +1,2254 @@ + + + + +JSONArray + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class JSONArray

+
+
java.lang.Object +
org.json.JSONArray
+
+
+
+
All Implemented Interfaces:
+
Iterable<Object>
+
+
+
public class JSONArray +extends Object +implements Iterable<Object>
+
A JSONArray is an ordered sequence of values. Its external text form is a + string wrapped in square brackets with commas separating the values. The + internal form is an object having get and opt + methods for accessing the values by index, and put methods for + adding or replacing values. The values can be any of these types: + Boolean, JSONArray, JSONObject, + Number, String, or the + JSONObject.NULL object. +

+ The constructor can convert a JSON text into a Java object. The + toString method converts to JSON text. +

+ A get method returns a value if one can be found, and throws an + exception if one cannot be found. An opt method returns a + default value instead of throwing an exception, and so is useful for + obtaining optional values. +

+ The generic get() and opt() methods return an + object which you can cast or query for type. There are also typed + get and opt methods that do type checking and type + coercion for you. +

+ The texts produced by the toString methods strictly conform to + JSON syntax rules. The constructors are more forgiving in the texts they will + accept: +

    +
  • An extra , (comma) may appear just + before the closing bracket.
  • +
  • The null value will be inserted when there is , +  (comma) elision.
  • +
  • Strings may be quoted with ' (single + quote).
  • +
  • Strings do not need to be quoted at all if they do not begin with a quote + or single quote, and if they do not contain leading or trailing spaces, and + if they do not contain any of these characters: + { } [ ] / \ : , # and if they do not look like numbers and + if they are not the reserved words true, false, or + null.
  • +
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Construct an empty JSONArray.
    +
    +
    JSONArray(int initialCapacity)
    +
    +
    Construct a JSONArray with the specified initial capacity.
    +
    + +
    +
    Construct a JSONArray from an Iterable.
    +
    + +
    +
    Construct a JSONArray from an array.
    +
    +
    JSONArray(String source)
    +
    +
    Construct a JSONArray from a source JSON text.
    +
    +
    JSONArray(Collection<?> collection)
    +
    +
    Construct a JSONArray from a Collection.
    +
    +
    JSONArray(Collection<?> collection, + JSONParserConfiguration jsonParserConfiguration)
    +
    +
    Construct a JSONArray from a Collection.
    +
    + +
    +
    Construct a JSONArray from another JSONArray.
    +
    + +
    +
    Construct a JSONArray from a JSONTokener.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Removes all of the elements from this JSONArray.
    +
    + +
    get(int index)
    +
    +
    Get the object value associated with an index.
    +
    + +
    getBigDecimal(int index)
    +
    +
    Get the BigDecimal value associated with an index.
    +
    + +
    getBigInteger(int index)
    +
    +
    Get the BigInteger value associated with an index.
    +
    +
    boolean
    +
    getBoolean(int index)
    +
    +
    Get the boolean value associated with an index.
    +
    +
    double
    +
    getDouble(int index)
    +
    +
    Get the double value associated with an index.
    +
    +
    <E extends Enum<E>>
    E
    +
    getEnum(Class<E> clazz, + int index)
    +
    +
    Get the enum value associated with an index.
    +
    +
    float
    +
    getFloat(int index)
    +
    +
    Get the float value associated with a key.
    +
    +
    int
    +
    getInt(int index)
    +
    +
    Get the int value associated with an index.
    +
    + +
    getJSONArray(int index)
    +
    +
    Get the JSONArray associated with an index.
    +
    + +
    getJSONObject(int index)
    +
    +
    Get the JSONObject associated with an index.
    +
    +
    long
    +
    getLong(int index)
    +
    +
    Get the long value associated with an index.
    +
    + +
    getNumber(int index)
    +
    +
    Get the Number value associated with a key.
    +
    + +
    getString(int index)
    +
    +
    Get the string associated with an index.
    +
    +
    boolean
    + +
    +
    Check if JSONArray is empty.
    +
    +
    boolean
    +
    isNull(int index)
    +
    +
    Determine if the value is null.
    +
    + + +
     
    + +
    join(String separator)
    +
    +
    Make a string from the contents of this JSONArray.
    +
    +
    int
    + +
    +
    Get the number of elements in the JSONArray, included nulls.
    +
    + +
    opt(int index)
    +
    +
    Get the optional object value associated with an index.
    +
    + +
    optBigDecimal(int index, + BigDecimal defaultValue)
    +
    +
    Get the optional BigDecimal value associated with an index.
    +
    + +
    optBigInteger(int index, + BigInteger defaultValue)
    +
    +
    Get the optional BigInteger value associated with an index.
    +
    +
    boolean
    +
    optBoolean(int index)
    +
    +
    Get the optional boolean value associated with an index.
    +
    +
    boolean
    +
    optBoolean(int index, + boolean defaultValue)
    +
    +
    Get the optional boolean value associated with an index.
    +
    + +
    optBooleanObject(int index)
    +
    +
    Get the optional Boolean object associated with an index.
    +
    + +
    optBooleanObject(int index, + Boolean defaultValue)
    +
    +
    Get the optional Boolean object associated with an index.
    +
    +
    double
    +
    optDouble(int index)
    +
    +
    Get the optional double value associated with an index.
    +
    +
    double
    +
    optDouble(int index, + double defaultValue)
    +
    +
    Get the optional double value associated with an index.
    +
    + +
    optDoubleObject(int index)
    +
    +
    Get the optional Double object associated with an index.
    +
    + +
    optDoubleObject(int index, + Double defaultValue)
    +
    +
    Get the optional double value associated with an index.
    +
    +
    <E extends Enum<E>>
    E
    +
    optEnum(Class<E> clazz, + int index)
    +
    +
    Get the enum value associated with a key.
    +
    +
    <E extends Enum<E>>
    E
    +
    optEnum(Class<E> clazz, + int index, + E defaultValue)
    +
    +
    Get the enum value associated with a key.
    +
    +
    float
    +
    optFloat(int index)
    +
    +
    Get the optional float value associated with an index.
    +
    +
    float
    +
    optFloat(int index, + float defaultValue)
    +
    +
    Get the optional float value associated with an index.
    +
    + +
    optFloatObject(int index)
    +
    +
    Get the optional Float object associated with an index.
    +
    + +
    optFloatObject(int index, + Float defaultValue)
    +
    +
    Get the optional Float object associated with an index.
    +
    +
    int
    +
    optInt(int index)
    +
    +
    Get the optional int value associated with an index.
    +
    +
    int
    +
    optInt(int index, + int defaultValue)
    +
    +
    Get the optional int value associated with an index.
    +
    + +
    optIntegerObject(int index)
    +
    +
    Get the optional Integer object associated with an index.
    +
    + +
    optIntegerObject(int index, + Integer defaultValue)
    +
    +
    Get the optional Integer object associated with an index.
    +
    + +
    optJSONArray(int index)
    +
    +
    Get the optional JSONArray associated with an index.
    +
    + +
    optJSONArray(int index, + JSONArray defaultValue)
    +
    +
    Get the optional JSONArray associated with an index.
    +
    + +
    optJSONObject(int index)
    +
    +
    Get the optional JSONObject associated with an index.
    +
    + +
    optJSONObject(int index, + JSONObject defaultValue)
    +
    +
    Get the optional JSONObject associated with an index.
    +
    +
    long
    +
    optLong(int index)
    +
    +
    Get the optional long value associated with an index.
    +
    +
    long
    +
    optLong(int index, + long defaultValue)
    +
    +
    Get the optional long value associated with an index.
    +
    + +
    optLongObject(int index)
    +
    +
    Get the optional Long object associated with an index.
    +
    + +
    optLongObject(int index, + Long defaultValue)
    +
    +
    Get the optional Long object associated with an index.
    +
    + +
    optNumber(int index)
    +
    +
    Get an optional Number value associated with a key, or null + if there is no such key or if the value is not a number.
    +
    + +
    optNumber(int index, + Number defaultValue)
    +
    +
    Get an optional Number value associated with a key, or the default if there + is no such key or if the value is not a number.
    +
    + +
    optQuery(String jsonPointer)
    +
    +
    Queries and returns a value from this object using jsonPointer, or + returns null if the query fails due to a missing key.
    +
    + +
    optQuery(JSONPointer jsonPointer)
    +
    +
    Queries and returns a value from this object using jsonPointer, or + returns null if the query fails due to a missing key.
    +
    + +
    optString(int index)
    +
    +
    Get the optional string value associated with an index.
    +
    + +
    optString(int index, + String defaultValue)
    +
    +
    Get the optional string associated with an index.
    +
    + +
    put(boolean value)
    +
    +
    Append a boolean value.
    +
    + +
    put(double value)
    +
    +
    Append a double value.
    +
    + +
    put(float value)
    +
    +
    Append a float value.
    +
    + +
    put(int value)
    +
    +
    Append an int value.
    +
    + +
    put(int index, + boolean value)
    +
    +
    Put or replace a boolean value in the JSONArray.
    +
    + +
    put(int index, + double value)
    +
    +
    Put or replace a double value.
    +
    + +
    put(int index, + float value)
    +
    +
    Put or replace a float value.
    +
    + +
    put(int index, + int value)
    +
    +
    Put or replace an int value.
    +
    + +
    put(int index, + long value)
    +
    +
    Put or replace a long value.
    +
    + +
    put(int index, + Object value)
    +
    +
    Put or replace an object value in the JSONArray.
    +
    + +
    put(int index, + Collection<?> value)
    +
    +
    Put a value in the JSONArray, where the value will be a JSONArray which + is produced from a Collection.
    +
    + +
    put(int index, + Map<?,?> value)
    +
    +
    Put a value in the JSONArray, where the value will be a JSONObject that + is produced from a Map.
    +
    + +
    put(int index, + Map<?,?> value, + JSONParserConfiguration jsonParserConfiguration)
    +
    +
    Put a value in the JSONArray, where the value will be a JSONObject that + is produced from a Map.
    +
    + +
    put(long value)
    +
    +
    Append an long value.
    +
    + +
    put(Object value)
    +
    +
    Append an object value.
    +
    + +
    put(Collection<?> value)
    +
    +
    Put a value in the JSONArray, where the value will be a JSONArray which + is produced from a Collection.
    +
    + +
    put(Map<?,?> value)
    +
    +
    Put a value in the JSONArray, where the value will be a JSONObject which + is produced from a Map.
    +
    + +
    putAll(Iterable<?> iter)
    +
    +
    Put an Iterable's elements in to the JSONArray.
    +
    + +
    putAll(Object array)
    +
    +
    Put an array's elements in to the JSONArray.
    +
    + +
    putAll(Collection<?> collection)
    +
    +
    Put a collection's elements in to the JSONArray.
    +
    + + +
    +
    Put a JSONArray's elements in to the JSONArray.
    +
    + +
    query(String jsonPointer)
    +
    +
    Creates a JSONPointer using an initialization string and tries to + match it to an item within this JSONArray.
    +
    + +
    query(JSONPointer jsonPointer)
    +
    +
    Uses a user initialized JSONPointer and tries to + match it to an item within this JSONArray.
    +
    + +
    remove(int index)
    +
    +
    Remove an index and close the hole.
    +
    +
    boolean
    +
    similar(Object other)
    +
    +
    Determine if two JSONArrays are similar.
    +
    + + +
    +
    Produce a JSONObject by combining a JSONArray of names with the values of + this JSONArray.
    +
    + + +
    +
    Returns a java.util.List containing all of the elements in this array.
    +
    + + +
    +
    Make a JSON text of this JSONArray.
    +
    + +
    toString(int indentFactor)
    +
    +
    Make a pretty-printed JSON text of this JSONArray.
    +
    + +
    write(Writer writer)
    +
    +
    Write the contents of the JSONArray as JSON text to a writer.
    +
    + +
    write(Writer writer, + int indentFactor, + int indent)
    +
    +
    Write the contents of the JSONArray as JSON text to a writer.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    +
    +

    Methods inherited from interface java.lang.Iterable

    +forEach, spliterator
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      JSONArray

      +
      public JSONArray()
      +
      Construct an empty JSONArray.
      +
      +
    • +
    • +
      +

      JSONArray

      +
      public JSONArray(JSONTokener x) + throws JSONException
      +
      Construct a JSONArray from a JSONTokener.
      +
      +
      Parameters:
      +
      x - A JSONTokener
      +
      Throws:
      +
      JSONException - If there is a syntax error.
      +
      +
      +
    • +
    • +
      +

      JSONArray

      +
      public JSONArray(String source) + throws JSONException
      +
      Construct a JSONArray from a source JSON text.
      +
      +
      Parameters:
      +
      source - A string that begins with [ (left + bracket) and ends with ] +  (right bracket).
      +
      Throws:
      +
      JSONException - If there is a syntax error.
      +
      +
      +
    • +
    • +
      +

      JSONArray

      +
      public JSONArray(Collection<?> collection)
      +
      Construct a JSONArray from a Collection.
      +
      +
      Parameters:
      +
      collection - A Collection.
      +
      +
      +
    • +
    • +
      +

      JSONArray

      +
      public JSONArray(Collection<?> collection, + JSONParserConfiguration jsonParserConfiguration)
      +
      Construct a JSONArray from a Collection.
      +
      +
      Parameters:
      +
      collection - A Collection.
      +
      jsonParserConfiguration - Configuration object for the JSON parser
      +
      +
      +
    • +
    • +
      +

      JSONArray

      +
      public JSONArray(Iterable<?> iter)
      +
      Construct a JSONArray from an Iterable. This is a shallow copy.
      +
      +
      Parameters:
      +
      iter - A Iterable collection.
      +
      +
      +
    • +
    • +
      +

      JSONArray

      +
      public JSONArray(JSONArray array)
      +
      Construct a JSONArray from another JSONArray. This is a shallow copy.
      +
      +
      Parameters:
      +
      array - A array.
      +
      +
      +
    • +
    • +
      +

      JSONArray

      +
      public JSONArray(Object array) + throws JSONException
      +
      Construct a JSONArray from an array.
      +
      +
      Parameters:
      +
      array - Array. If the parameter passed is null, or not an array, an + exception will be thrown.
      +
      Throws:
      +
      JSONException - If not an array or if an array value is non-finite number.
      +
      NullPointerException - Thrown if the array parameter is null.
      +
      +
      +
    • +
    • +
      +

      JSONArray

      +
      public JSONArray(int initialCapacity) + throws JSONException
      +
      Construct a JSONArray with the specified initial capacity.
      +
      +
      Parameters:
      +
      initialCapacity - the initial capacity of the JSONArray.
      +
      Throws:
      +
      JSONException - If the initial capacity is negative.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      iterator

      +
      public Iterator<Object> iterator()
      +
      +
      Specified by:
      +
      iterator in interface Iterable<Object>
      +
      +
      +
    • +
    • +
      +

      get

      +
      public Object get(int index) + throws JSONException
      +
      Get the object value associated with an index.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      An object value.
      +
      Throws:
      +
      JSONException - If there is no value for the index.
      +
      +
      +
    • +
    • +
      +

      getBoolean

      +
      public boolean getBoolean(int index) + throws JSONException
      +
      Get the boolean value associated with an index. The string values "true" + and "false" are converted to boolean.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The truth.
      +
      Throws:
      +
      JSONException - If there is no value for the index or if the value is not + convertible to boolean.
      +
      +
      +
    • +
    • +
      +

      getDouble

      +
      public double getDouble(int index) + throws JSONException
      +
      Get the double value associated with an index.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The value.
      +
      Throws:
      +
      JSONException - If the key is not found or if the value cannot be converted + to a number.
      +
      +
      +
    • +
    • +
      +

      getFloat

      +
      public float getFloat(int index) + throws JSONException
      +
      Get the float value associated with a key.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The numeric value.
      +
      Throws:
      +
      JSONException - if the key is not found or if the value is not a Number + object and cannot be converted to a number.
      +
      +
      +
    • +
    • +
      +

      getNumber

      +
      public Number getNumber(int index) + throws JSONException
      +
      Get the Number value associated with a key.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The numeric value.
      +
      Throws:
      +
      JSONException - if the key is not found or if the value is not a Number + object and cannot be converted to a number.
      +
      +
      +
    • +
    • +
      +

      getEnum

      +
      public <E extends Enum<E>> E getEnum(Class<E> clazz, + int index) + throws JSONException
      +
      Get the enum value associated with an index.
      +
      +
      Type Parameters:
      +
      E - Enum Type
      +
      Parameters:
      +
      clazz - The type of enum to retrieve.
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The enum value at the index location
      +
      Throws:
      +
      JSONException - if the key is not found or if the value cannot be converted + to an enum.
      +
      +
      +
    • +
    • +
      +

      getBigDecimal

      +
      public BigDecimal getBigDecimal(int index) + throws JSONException
      +
      Get the BigDecimal value associated with an index. If the value is float + or double, the BigDecimal(double) constructor + will be used. See notes on the constructor for conversion issues that + may arise.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The value.
      +
      Throws:
      +
      JSONException - If the key is not found or if the value cannot be converted + to a BigDecimal.
      +
      +
      +
    • +
    • +
      +

      getBigInteger

      +
      public BigInteger getBigInteger(int index) + throws JSONException
      +
      Get the BigInteger value associated with an index.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The value.
      +
      Throws:
      +
      JSONException - If the key is not found or if the value cannot be converted + to a BigInteger.
      +
      +
      +
    • +
    • +
      +

      getInt

      +
      public int getInt(int index) + throws JSONException
      +
      Get the int value associated with an index.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The value.
      +
      Throws:
      +
      JSONException - If the key is not found or if the value is not a number.
      +
      +
      +
    • +
    • +
      +

      getJSONArray

      +
      public JSONArray getJSONArray(int index) + throws JSONException
      +
      Get the JSONArray associated with an index.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      A JSONArray value.
      +
      Throws:
      +
      JSONException - If there is no value for the index. or if the value is not a + JSONArray
      +
      +
      +
    • +
    • +
      +

      getJSONObject

      +
      public JSONObject getJSONObject(int index) + throws JSONException
      +
      Get the JSONObject associated with an index.
      +
      +
      Parameters:
      +
      index - subscript
      +
      Returns:
      +
      A JSONObject value.
      +
      Throws:
      +
      JSONException - If there is no value for the index or if the value is not a + JSONObject
      +
      +
      +
    • +
    • +
      +

      getLong

      +
      public long getLong(int index) + throws JSONException
      +
      Get the long value associated with an index.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The value.
      +
      Throws:
      +
      JSONException - If the key is not found or if the value cannot be converted + to a number.
      +
      +
      +
    • +
    • +
      +

      getString

      +
      public String getString(int index) + throws JSONException
      +
      Get the string associated with an index.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      A string value.
      +
      Throws:
      +
      JSONException - If there is no string value for the index.
      +
      +
      +
    • +
    • +
      +

      isNull

      +
      public boolean isNull(int index)
      +
      Determine if the value is null.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      true if the value at the index is null, or if there is no value.
      +
      +
      +
    • +
    • +
      +

      join

      +
      public String join(String separator) + throws JSONException
      +
      Make a string from the contents of this JSONArray. The + separator string is inserted between each element. Warning: + This method assumes that the data structure is acyclical.
      +
      +
      Parameters:
      +
      separator - A string that will be inserted between the elements.
      +
      Returns:
      +
      a string.
      +
      Throws:
      +
      JSONException - If the array contains an invalid number.
      +
      +
      +
    • +
    • +
      +

      length

      +
      public int length()
      +
      Get the number of elements in the JSONArray, included nulls.
      +
      +
      Returns:
      +
      The length (or size).
      +
      +
      +
    • +
    • +
      +

      clear

      +
      public void clear()
      +
      Removes all of the elements from this JSONArray. + The JSONArray will be empty after this call returns.
      +
      +
    • +
    • +
      +

      opt

      +
      public Object opt(int index)
      +
      Get the optional object value associated with an index.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1. If not, null is returned.
      +
      Returns:
      +
      An object value, or null if there is no object at that index.
      +
      +
      +
    • +
    • +
      +

      optBoolean

      +
      public boolean optBoolean(int index)
      +
      Get the optional boolean value associated with an index. It returns false + if there is no value at that index, or if the value is not Boolean.TRUE + or the String "true".
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The truth.
      +
      +
      +
    • +
    • +
      +

      optBoolean

      +
      public boolean optBoolean(int index, + boolean defaultValue)
      +
      Get the optional boolean value associated with an index. It returns the + defaultValue if there is no value at that index or if it is not a Boolean + or the String "true" or "false" (case insensitive).
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      defaultValue - A boolean default.
      +
      Returns:
      +
      The truth.
      +
      +
      +
    • +
    • +
      +

      optBooleanObject

      +
      public Boolean optBooleanObject(int index)
      +
      Get the optional Boolean object associated with an index. It returns false + if there is no value at that index, or if the value is not Boolean.TRUE + or the String "true".
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The truth.
      +
      +
      +
    • +
    • +
      +

      optBooleanObject

      +
      public Boolean optBooleanObject(int index, + Boolean defaultValue)
      +
      Get the optional Boolean object associated with an index. It returns the + defaultValue if there is no value at that index or if it is not a Boolean + or the String "true" or "false" (case insensitive).
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      defaultValue - A boolean default.
      +
      Returns:
      +
      The truth.
      +
      +
      +
    • +
    • +
      +

      optDouble

      +
      public double optDouble(int index)
      +
      Get the optional double value associated with an index. NaN is returned + if there is no value for the index, or if the value is not a number and + cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The value.
      +
      +
      +
    • +
    • +
      +

      optDouble

      +
      public double optDouble(int index, + double defaultValue)
      +
      Get the optional double value associated with an index. The defaultValue + is returned if there is no value for the index, or if the value is not a + number and cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - subscript
      +
      defaultValue - The default value.
      +
      Returns:
      +
      The value.
      +
      +
      +
    • +
    • +
      +

      optDoubleObject

      +
      public Double optDoubleObject(int index)
      +
      Get the optional Double object associated with an index. NaN is returned + if there is no value for the index, or if the value is not a number and + cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The object.
      +
      +
      +
    • +
    • +
      +

      optDoubleObject

      +
      public Double optDoubleObject(int index, + Double defaultValue)
      +
      Get the optional double value associated with an index. The defaultValue + is returned if there is no value for the index, or if the value is not a + number and cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - subscript
      +
      defaultValue - The default object.
      +
      Returns:
      +
      The object.
      +
      +
      +
    • +
    • +
      +

      optFloat

      +
      public float optFloat(int index)
      +
      Get the optional float value associated with an index. NaN is returned + if there is no value for the index, or if the value is not a number and + cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The value.
      +
      +
      +
    • +
    • +
      +

      optFloat

      +
      public float optFloat(int index, + float defaultValue)
      +
      Get the optional float value associated with an index. The defaultValue + is returned if there is no value for the index, or if the value is not a + number and cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - subscript
      +
      defaultValue - The default value.
      +
      Returns:
      +
      The value.
      +
      +
      +
    • +
    • +
      +

      optFloatObject

      +
      public Float optFloatObject(int index)
      +
      Get the optional Float object associated with an index. NaN is returned + if there is no value for the index, or if the value is not a number and + cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The object.
      +
      +
      +
    • +
    • +
      +

      optFloatObject

      +
      public Float optFloatObject(int index, + Float defaultValue)
      +
      Get the optional Float object associated with an index. The defaultValue + is returned if there is no value for the index, or if the value is not a + number and cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - subscript
      +
      defaultValue - The default object.
      +
      Returns:
      +
      The object.
      +
      +
      +
    • +
    • +
      +

      optInt

      +
      public int optInt(int index)
      +
      Get the optional int value associated with an index. Zero is returned if + there is no value for the index, or if the value is not a number and + cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The value.
      +
      +
      +
    • +
    • +
      +

      optInt

      +
      public int optInt(int index, + int defaultValue)
      +
      Get the optional int value associated with an index. The defaultValue is + returned if there is no value for the index, or if the value is not a + number and cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      defaultValue - The default value.
      +
      Returns:
      +
      The value.
      +
      +
      +
    • +
    • +
      +

      optIntegerObject

      +
      public Integer optIntegerObject(int index)
      +
      Get the optional Integer object associated with an index. Zero is returned if + there is no value for the index, or if the value is not a number and + cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The object.
      +
      +
      +
    • +
    • +
      +

      optIntegerObject

      +
      public Integer optIntegerObject(int index, + Integer defaultValue)
      +
      Get the optional Integer object associated with an index. The defaultValue is + returned if there is no value for the index, or if the value is not a + number and cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      defaultValue - The default object.
      +
      Returns:
      +
      The object.
      +
      +
      +
    • +
    • +
      +

      optEnum

      +
      public <E extends Enum<E>> E optEnum(Class<E> clazz, + int index)
      +
      Get the enum value associated with a key.
      +
      +
      Type Parameters:
      +
      E - Enum Type
      +
      Parameters:
      +
      clazz - The type of enum to retrieve.
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The enum value at the index location or null if not found
      +
      +
      +
    • +
    • +
      +

      optEnum

      +
      public <E extends Enum<E>> E optEnum(Class<E> clazz, + int index, + E defaultValue)
      +
      Get the enum value associated with a key.
      +
      +
      Type Parameters:
      +
      E - Enum Type
      +
      Parameters:
      +
      clazz - The type of enum to retrieve.
      +
      index - The index must be between 0 and length() - 1.
      +
      defaultValue - The default in case the value is not found
      +
      Returns:
      +
      The enum value at the index location or defaultValue if + the value is not found or cannot be assigned to clazz
      +
      +
      +
    • +
    • +
      +

      optBigInteger

      +
      public BigInteger optBigInteger(int index, + BigInteger defaultValue)
      +
      Get the optional BigInteger value associated with an index. The + defaultValue is returned if there is no value for the index, or if the + value is not a number and cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      defaultValue - The default value.
      +
      Returns:
      +
      The value.
      +
      +
      +
    • +
    • +
      +

      optBigDecimal

      +
      public BigDecimal optBigDecimal(int index, + BigDecimal defaultValue)
      +
      Get the optional BigDecimal value associated with an index. The + defaultValue is returned if there is no value for the index, or if the + value is not a number and cannot be converted to a number. If the value + is float or double, the BigDecimal(double) + constructor will be used. See notes on the constructor for conversion + issues that may arise.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      defaultValue - The default value.
      +
      Returns:
      +
      The value.
      +
      +
      +
    • +
    • +
      +

      optJSONArray

      +
      public JSONArray optJSONArray(int index)
      +
      Get the optional JSONArray associated with an index. Null is returned if + there is no value at that index or if the value is not a JSONArray.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      A JSONArray value.
      +
      +
      +
    • +
    • +
      +

      optJSONArray

      +
      public JSONArray optJSONArray(int index, + JSONArray defaultValue)
      +
      Get the optional JSONArray associated with an index. The defaultValue is returned if + there is no value at that index or if the value is not a JSONArray.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      defaultValue - The default.
      +
      Returns:
      +
      A JSONArray value.
      +
      +
      +
    • +
    • +
      +

      optJSONObject

      +
      public JSONObject optJSONObject(int index)
      +
      Get the optional JSONObject associated with an index. Null is returned if + there is no value at that index or if the value is not a JSONObject.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      A JSONObject value.
      +
      +
      +
    • +
    • +
      +

      optJSONObject

      +
      public JSONObject optJSONObject(int index, + JSONObject defaultValue)
      +
      Get the optional JSONObject associated with an index. The defaultValue is returned if + there is no value at that index or if the value is not a JSONObject.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      defaultValue - The default.
      +
      Returns:
      +
      A JSONObject value.
      +
      +
      +
    • +
    • +
      +

      optLong

      +
      public long optLong(int index)
      +
      Get the optional long value associated with an index. Zero is returned if + there is no value for the index, or if the value is not a number and + cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The value.
      +
      +
      +
    • +
    • +
      +

      optLong

      +
      public long optLong(int index, + long defaultValue)
      +
      Get the optional long value associated with an index. The defaultValue is + returned if there is no value for the index, or if the value is not a + number and cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      defaultValue - The default value.
      +
      Returns:
      +
      The value.
      +
      +
      +
    • +
    • +
      +

      optLongObject

      +
      public Long optLongObject(int index)
      +
      Get the optional Long object associated with an index. Zero is returned if + there is no value for the index, or if the value is not a number and + cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      The object.
      +
      +
      +
    • +
    • +
      +

      optLongObject

      +
      public Long optLongObject(int index, + Long defaultValue)
      +
      Get the optional Long object associated with an index. The defaultValue is + returned if there is no value for the index, or if the value is not a + number and cannot be converted to a number.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      defaultValue - The default object.
      +
      Returns:
      +
      The object.
      +
      +
      +
    • +
    • +
      +

      optNumber

      +
      public Number optNumber(int index)
      +
      Get an optional Number value associated with a key, or null + if there is no such key or if the value is not a number. If the value is a string, + an attempt will be made to evaluate it as a number (BigDecimal). This method + would be used in cases where type coercion of the number value is unwanted.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optNumber

      +
      public Number optNumber(int index, + Number defaultValue)
      +
      Get an optional Number value associated with a key, or the default if there + is no such key or if the value is not a number. If the value is a string, + an attempt will be made to evaluate it as a number (BigDecimal). This method + would be used in cases where type coercion of the number value is unwanted.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      defaultValue - The default.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optString

      +
      public String optString(int index)
      +
      Get the optional string value associated with an index. It returns an + empty string if there is no value at that index. If the value is not a + string and is not null, then it is converted to a string.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      Returns:
      +
      A String value.
      +
      +
      +
    • +
    • +
      +

      optString

      +
      public String optString(int index, + String defaultValue)
      +
      Get the optional string associated with an index. The defaultValue is + returned if the key is not found.
      +
      +
      Parameters:
      +
      index - The index must be between 0 and length() - 1.
      +
      defaultValue - The default value.
      +
      Returns:
      +
      A String value.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(boolean value)
      +
      Append a boolean value. This increases the array's length by one.
      +
      +
      Parameters:
      +
      value - A boolean value.
      +
      Returns:
      +
      this.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(Collection<?> value)
      +
      Put a value in the JSONArray, where the value will be a JSONArray which + is produced from a Collection.
      +
      +
      Parameters:
      +
      value - A Collection value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the value is non-finite number.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(double value) + throws JSONException
      +
      Append a double value. This increases the array's length by one.
      +
      +
      Parameters:
      +
      value - A double value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - if the value is not finite.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(float value) + throws JSONException
      +
      Append a float value. This increases the array's length by one.
      +
      +
      Parameters:
      +
      value - A float value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - if the value is not finite.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(int value)
      +
      Append an int value. This increases the array's length by one.
      +
      +
      Parameters:
      +
      value - An int value.
      +
      Returns:
      +
      this.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(long value)
      +
      Append an long value. This increases the array's length by one.
      +
      +
      Parameters:
      +
      value - A long value.
      +
      Returns:
      +
      this.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(Map<?,?> value)
      +
      Put a value in the JSONArray, where the value will be a JSONObject which + is produced from a Map.
      +
      +
      Parameters:
      +
      value - A Map value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If a value in the map is non-finite number.
      +
      NullPointerException - If a key in the map is null
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(Object value)
      +
      Append an object value. This increases the array's length by one.
      +
      +
      Parameters:
      +
      value - An object value. The value should be a Boolean, Double, + Integer, JSONArray, JSONObject, Long, or String, or the + JSONObject.NULL object.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the value is non-finite number.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(int index, + boolean value) + throws JSONException
      +
      Put or replace a boolean value in the JSONArray. If the index is greater + than the length of the JSONArray, then null elements will be added as + necessary to pad it out.
      +
      +
      Parameters:
      +
      index - The subscript.
      +
      value - A boolean value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the index is negative.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(int index, + Collection<?> value) + throws JSONException
      +
      Put a value in the JSONArray, where the value will be a JSONArray which + is produced from a Collection.
      +
      +
      Parameters:
      +
      index - The subscript.
      +
      value - A Collection value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the index is negative or if the value is non-finite.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(int index, + double value) + throws JSONException
      +
      Put or replace a double value. If the index is greater than the length of + the JSONArray, then null elements will be added as necessary to pad it + out.
      +
      +
      Parameters:
      +
      index - The subscript.
      +
      value - A double value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the index is negative or if the value is non-finite.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(int index, + float value) + throws JSONException
      +
      Put or replace a float value. If the index is greater than the length of + the JSONArray, then null elements will be added as necessary to pad it + out.
      +
      +
      Parameters:
      +
      index - The subscript.
      +
      value - A float value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the index is negative or if the value is non-finite.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(int index, + int value) + throws JSONException
      +
      Put or replace an int value. If the index is greater than the length of + the JSONArray, then null elements will be added as necessary to pad it + out.
      +
      +
      Parameters:
      +
      index - The subscript.
      +
      value - An int value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the index is negative.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(int index, + long value) + throws JSONException
      +
      Put or replace a long value. If the index is greater than the length of + the JSONArray, then null elements will be added as necessary to pad it + out.
      +
      +
      Parameters:
      +
      index - The subscript.
      +
      value - A long value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the index is negative.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(int index, + Map<?,?> value) + throws JSONException
      +
      Put a value in the JSONArray, where the value will be a JSONObject that + is produced from a Map.
      +
      +
      Parameters:
      +
      index - The subscript.
      +
      value - The Map value.
      +
      Returns:
      +
      reference to self
      +
      Throws:
      +
      JSONException - If the index is negative or if the value is an invalid + number.
      +
      NullPointerException - If a key in the map is null
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(int index, + Map<?,?> value, + JSONParserConfiguration jsonParserConfiguration) + throws JSONException
      +
      Put a value in the JSONArray, where the value will be a JSONObject that + is produced from a Map.
      +
      +
      Parameters:
      +
      index - The subscript
      +
      value - The Map value.
      +
      jsonParserConfiguration - Configuration object for the JSON parser
      +
      Returns:
      +
      reference to self
      +
      Throws:
      +
      JSONException - If the index is negative or if the value is an invalid + number.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONArray put(int index, + Object value) + throws JSONException
      +
      Put or replace an object value in the JSONArray. If the index is greater + than the length of the JSONArray, then null elements will be added as + necessary to pad it out.
      +
      +
      Parameters:
      +
      index - The subscript.
      +
      value - The value to put into the array. The value should be a + Boolean, Double, Integer, JSONArray, JSONObject, Long, or + String, or the JSONObject.NULL object.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the index is negative or if the value is an invalid + number.
      +
      +
      +
    • +
    • +
      +

      putAll

      +
      public JSONArray putAll(Collection<?> collection)
      +
      Put a collection's elements in to the JSONArray.
      +
      +
      Parameters:
      +
      collection - A Collection.
      +
      Returns:
      +
      this.
      +
      +
      +
    • +
    • +
      +

      putAll

      +
      public JSONArray putAll(Iterable<?> iter)
      +
      Put an Iterable's elements in to the JSONArray.
      +
      +
      Parameters:
      +
      iter - An Iterable.
      +
      Returns:
      +
      this.
      +
      +
      +
    • +
    • +
      +

      putAll

      +
      public JSONArray putAll(JSONArray array)
      +
      Put a JSONArray's elements in to the JSONArray.
      +
      +
      Parameters:
      +
      array - A JSONArray.
      +
      Returns:
      +
      this.
      +
      +
      +
    • +
    • +
      +

      putAll

      +
      public JSONArray putAll(Object array) + throws JSONException
      +
      Put an array's elements in to the JSONArray.
      +
      +
      Parameters:
      +
      array - Array. If the parameter passed is null, or not an array or Iterable, an + exception will be thrown.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If not an array, JSONArray, Iterable or if an value is non-finite number.
      +
      NullPointerException - Thrown if the array parameter is null.
      +
      +
      +
    • +
    • +
      +

      query

      +
      public Object query(String jsonPointer)
      +
      Creates a JSONPointer using an initialization string and tries to + match it to an item within this JSONArray. For example, given a + JSONArray initialized with this document: +
      + [
      +     {"b":"c"}
      + ]
      + 
      + and this JSONPointer string: +
      + "/0/b"
      + 
      + Then this method will return the String "c" + A JSONPointerException may be thrown from code called by this method.
      +
      +
      Parameters:
      +
      jsonPointer - string that can be used to create a JSONPointer
      +
      Returns:
      +
      the item matched by the JSONPointer, otherwise null
      +
      +
      +
    • +
    • +
      +

      query

      +
      public Object query(JSONPointer jsonPointer)
      +
      Uses a user initialized JSONPointer and tries to + match it to an item within this JSONArray. For example, given a + JSONArray initialized with this document: +
      + [
      +     {"b":"c"}
      + ]
      + 
      + and this JSONPointer: +
      + "/0/b"
      + 
      + Then this method will return the String "c" + A JSONPointerException may be thrown from code called by this method.
      +
      +
      Parameters:
      +
      jsonPointer - string that can be used to create a JSONPointer
      +
      Returns:
      +
      the item matched by the JSONPointer, otherwise null
      +
      +
      +
    • +
    • +
      +

      optQuery

      +
      public Object optQuery(String jsonPointer)
      +
      Queries and returns a value from this object using jsonPointer, or + returns null if the query fails due to a missing key.
      +
      +
      Parameters:
      +
      jsonPointer - the string representation of the JSON pointer
      +
      Returns:
      +
      the queried value or null
      +
      Throws:
      +
      IllegalArgumentException - if jsonPointer has invalid syntax
      +
      +
      +
    • +
    • +
      +

      optQuery

      +
      public Object optQuery(JSONPointer jsonPointer)
      +
      Queries and returns a value from this object using jsonPointer, or + returns null if the query fails due to a missing key.
      +
      +
      Parameters:
      +
      jsonPointer - The JSON pointer
      +
      Returns:
      +
      the queried value or null
      +
      Throws:
      +
      IllegalArgumentException - if jsonPointer has invalid syntax
      +
      +
      +
    • +
    • +
      +

      remove

      +
      public Object remove(int index)
      +
      Remove an index and close the hole.
      +
      +
      Parameters:
      +
      index - The index of the element to be removed.
      +
      Returns:
      +
      The value that was associated with the index, or null if there + was no value.
      +
      +
      +
    • +
    • +
      +

      similar

      +
      public boolean similar(Object other)
      +
      Determine if two JSONArrays are similar. + They must contain similar sequences.
      +
      +
      Parameters:
      +
      other - The other JSONArray
      +
      Returns:
      +
      true if they are equal
      +
      +
      +
    • +
    • +
      +

      toJSONObject

      +
      public JSONObject toJSONObject(JSONArray names) + throws JSONException
      +
      Produce a JSONObject by combining a JSONArray of names with the values of + this JSONArray.
      +
      +
      Parameters:
      +
      names - A JSONArray containing a list of key strings. These will be + paired with the values.
      +
      Returns:
      +
      A JSONObject, or null if there are no names or if this JSONArray + has no values.
      +
      Throws:
      +
      JSONException - If any of the names are null.
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      Make a JSON text of this JSONArray. For compactness, no unnecessary + whitespace is added. If it is not possible to produce a syntactically + correct JSON text then null will be returned instead. This could occur if + the array contains an invalid number. +

      + Warning: This method assumes that the data structure is acyclical. +

      +
      +
      Overrides:
      +
      toString in class Object
      +
      Returns:
      +
      a printable, displayable, transmittable representation of the + array.
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString(int indentFactor) + throws JSONException
      +
      Make a pretty-printed JSON text of this JSONArray. + +

      If

       indentFactor > 0
      and the JSONArray has only + one element, then the array will be output on a single line: +
      [1]
      + +

      If an array has 2 or more elements, then it will be output across + multiple lines:

      
      + [
      + 1,
      + "value 2",
      + 3
      + ]
      + 
      +

      + Warning: This method assumes that the data structure is acyclical. +

      +
      +
      Parameters:
      +
      indentFactor - The number of spaces to add to each level of indentation.
      +
      Returns:
      +
      a printable, displayable, transmittable representation of the + object, beginning with [ (left + bracket) and ending with ] +  (right bracket).
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      write

      +
      public Writer write(Writer writer) + throws JSONException
      +
      Write the contents of the JSONArray as JSON text to a writer. For + compactness, no whitespace is added. +

      + Warning: This method assumes that the data structure is acyclical. +

      +
      +
      Parameters:
      +
      writer - the writer object
      +
      Returns:
      +
      The writer.
      +
      Throws:
      +
      JSONException - if a called function fails
      +
      +
      +
    • +
    • +
      +

      write

      +
      public Writer write(Writer writer, + int indentFactor, + int indent) + throws JSONException
      +
      Write the contents of the JSONArray as JSON text to a writer. + +

      If

      indentFactor > 0
      and the JSONArray has only + one element, then the array will be output on a single line: +
      [1]
      + +

      If an array has 2 or more elements, then it will be output across + multiple lines:

      
      + [
      + 1,
      + "value 2",
      + 3
      + ]
      + 
      +

      + Warning: This method assumes that the data structure is acyclical. +

      +
      +
      Parameters:
      +
      writer - Writes the serialized JSON
      +
      indentFactor - The number of spaces to add to each level of indentation.
      +
      indent - The indentation of the top level.
      +
      Returns:
      +
      The writer.
      +
      Throws:
      +
      JSONException - if a called function fails or unable to write
      +
      +
      +
    • +
    • +
      +

      toList

      +
      public List<Object> toList()
      +
      Returns a java.util.List containing all of the elements in this array. + If an element in the array is a JSONArray or JSONObject it will also + be converted to a List and a Map respectively. +

      + Warning: This method assumes that the data structure is acyclical.

      +
      +
      Returns:
      +
      a java.util.List containing the elements of this array
      +
      +
      +
    • +
    • +
      +

      isEmpty

      +
      public boolean isEmpty()
      +
      Check if JSONArray is empty.
      +
      +
      Returns:
      +
      true if JSONArray is empty, otherwise false.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/JSONException.html b/src/main/java/JSON-Java/org/json/JSONException.html new file mode 100644 index 0000000..d4b0c64 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/JSONException.html @@ -0,0 +1,193 @@ + + + + +JSONException + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class JSONException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
JSONPointerException
+
+
+
public class JSONException +extends RuntimeException
+
The JSONException is thrown by the JSON.org classes when things are amiss.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      JSONException

      +
      public JSONException(String message)
      +
      Constructs a JSONException with an explanatory message.
      +
      +
      Parameters:
      +
      message - Detail about the reason for the exception.
      +
      +
      +
    • +
    • +
      +

      JSONException

      +
      public JSONException(String message, + Throwable cause)
      +
      Constructs a JSONException with an explanatory message and cause.
      +
      +
      Parameters:
      +
      message - Detail about the reason for the exception.
      +
      cause - The cause.
      +
      +
      +
    • +
    • +
      +

      JSONException

      +
      public JSONException(Throwable cause)
      +
      Constructs a new JSONException with the specified cause.
      +
      +
      Parameters:
      +
      cause - The cause.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/JSONML.html b/src/main/java/JSON-Java/org/json/JSONML.html new file mode 100644 index 0000000..1672ca2 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/JSONML.html @@ -0,0 +1,594 @@ + + + + +JSONML + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class JSONML

+
+
java.lang.Object +
org.json.JSONML
+
+
+
+
public class JSONML +extends Object
+
This provides static methods to convert an XML text into a JSONArray or + JSONObject, and to covert a JSONArray or JSONObject into an XML text using + the JsonML transform.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      JSONML

      +
      public JSONML()
      +
      Constructs a new JSONML object.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toJSONArray

      +
      public static JSONArray toJSONArray(String string) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform. Each XML tag is represented as + a JSONArray in which the first element is the tag name. If the tag has + attributes, then the second element will be JSONObject containing the + name/value pairs. If the tag contains children, then strings and + JSONArrays will represent the child tags. + Comments, prologs, DTDs, and
      &lt;[ [ ]]>
      are ignored.
      +
      +
      Parameters:
      +
      string - The source string.
      +
      Returns:
      +
      A JSONArray containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown on error converting to a JSONArray
      +
      +
      +
    • +
    • +
      +

      toJSONArray

      +
      public static JSONArray toJSONArray(String string, + boolean keepStrings) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform. Each XML tag is represented as + a JSONArray in which the first element is the tag name. If the tag has + attributes, then the second element will be JSONObject containing the + name/value pairs. If the tag contains children, then strings and + JSONArrays will represent the child tags. + As opposed to toJSONArray this method does not attempt to convert + any text node or attribute value to any type + but just leaves it as a string. + Comments, prologs, DTDs, and
      &lt;[ [ ]]>
      are ignored.
      +
      +
      Parameters:
      +
      string - The source string.
      +
      keepStrings - If true, then values will not be coerced into boolean + or numeric values and will instead be left as strings
      +
      Returns:
      +
      A JSONArray containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown on error converting to a JSONArray
      +
      +
      +
    • +
    • +
      +

      toJSONArray

      +
      public static JSONArray toJSONArray(String string, + JSONMLParserConfiguration config) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform. Each XML tag is represented as + a JSONArray in which the first element is the tag name. If the tag has + attributes, then the second element will be JSONObject containing the + name/value pairs. If the tag contains children, then strings and + JSONArrays will represent the child tags. + As opposed to toJSONArray this method does not attempt to convert + any text node or attribute value to any type + but just leaves it as a string. + Comments, prologs, DTDs, and
      &lt;[ [ ]]>
      are ignored.
      +
      +
      Parameters:
      +
      string - The source string.
      +
      config - The parser configuration: + JSONMLParserConfiguration.ORIGINAL is the default behaviour; + JSONMLParserConfiguration.KEEP_STRINGS means values will not be coerced into boolean + or numeric values and will instead be left as strings
      +
      Returns:
      +
      A JSONArray containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown on error converting to a JSONArray
      +
      +
      +
    • +
    • +
      +

      toJSONArray

      +
      public static JSONArray toJSONArray(XMLTokener x, + JSONMLParserConfiguration config) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform. Each XML tag is represented as + a JSONArray in which the first element is the tag name. If the tag has + attributes, then the second element will be JSONObject containing the + name/value pairs. If the tag contains children, then strings and + JSONArrays will represent the child content and tags. + As opposed to toJSONArray this method does not attempt to convert + any text node or attribute value to any type + but just leaves it as a string. + Comments, prologs, DTDs, and
      &lt;[ [ ]]>
      are ignored.
      +
      +
      Parameters:
      +
      x - An XMLTokener.
      +
      config - The parser configuration: + JSONMLParserConfiguration.ORIGINAL is the default behaviour; + JSONMLParserConfiguration.KEEP_STRINGS means values will not be coerced into boolean + or numeric values and will instead be left as strings
      +
      Returns:
      +
      A JSONArray containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown on error converting to a JSONArray
      +
      +
      +
    • +
    • +
      +

      toJSONArray

      +
      public static JSONArray toJSONArray(XMLTokener x, + boolean keepStrings) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform. Each XML tag is represented as + a JSONArray in which the first element is the tag name. If the tag has + attributes, then the second element will be JSONObject containing the + name/value pairs. If the tag contains children, then strings and + JSONArrays will represent the child content and tags. + As opposed to toJSONArray this method does not attempt to convert + any text node or attribute value to any type + but just leaves it as a string. + Comments, prologs, DTDs, and
      &lt;[ [ ]]>
      are ignored.
      +
      +
      Parameters:
      +
      x - An XMLTokener.
      +
      keepStrings - If true, then values will not be coerced into boolean + or numeric values and will instead be left as strings
      +
      Returns:
      +
      A JSONArray containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown on error converting to a JSONArray
      +
      +
      +
    • +
    • +
      +

      toJSONArray

      +
      public static JSONArray toJSONArray(XMLTokener x) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONArray using the JsonML transform. Each XML tag is represented as + a JSONArray in which the first element is the tag name. If the tag has + attributes, then the second element will be JSONObject containing the + name/value pairs. If the tag contains children, then strings and + JSONArrays will represent the child content and tags. + Comments, prologs, DTDs, and
      &lt;[ [ ]]>
      are ignored.
      +
      +
      Parameters:
      +
      x - An XMLTokener.
      +
      Returns:
      +
      A JSONArray containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown on error converting to a JSONArray
      +
      +
      +
    • +
    • +
      +

      toJSONObject

      +
      public static JSONObject toJSONObject(String string) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform. Each XML tag is represented as + a JSONObject with a "tagName" property. If the tag has attributes, then + the attributes will be in the JSONObject as properties. If the tag + contains children, the object will have a "childNodes" property which + will be an array of strings and JsonML JSONObjects. + + Comments, prologs, DTDs, and
      &lt;[ [ ]]>
      are ignored.
      +
      +
      Parameters:
      +
      string - The XML source text.
      +
      Returns:
      +
      A JSONObject containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown on error converting to a JSONObject
      +
      +
      +
    • +
    • +
      +

      toJSONObject

      +
      public static JSONObject toJSONObject(String string, + boolean keepStrings) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform. Each XML tag is represented as + a JSONObject with a "tagName" property. If the tag has attributes, then + the attributes will be in the JSONObject as properties. If the tag + contains children, the object will have a "childNodes" property which + will be an array of strings and JsonML JSONObjects. + + Comments, prologs, DTDs, and
      &lt;[ [ ]]>
      are ignored.
      +
      +
      Parameters:
      +
      string - The XML source text.
      +
      keepStrings - If true, then values will not be coerced into boolean + or numeric values and will instead be left as strings
      +
      Returns:
      +
      A JSONObject containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown on error converting to a JSONObject
      +
      +
      +
    • +
    • +
      +

      toJSONObject

      +
      public static JSONObject toJSONObject(String string, + JSONMLParserConfiguration config) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform. Each XML tag is represented as + a JSONObject with a "tagName" property. If the tag has attributes, then + the attributes will be in the JSONObject as properties. If the tag + contains children, the object will have a "childNodes" property which + will be an array of strings and JsonML JSONObjects. + + Comments, prologs, DTDs, and
      &lt;[ [ ]]>
      are ignored.
      +
      +
      Parameters:
      +
      string - The XML source text.
      +
      config - The parser configuration: + JSONMLParserConfiguration.ORIGINAL is the default behaviour; + JSONMLParserConfiguration.KEEP_STRINGS means values will not be coerced into boolean + or numeric values and will instead be left as strings
      +
      Returns:
      +
      A JSONObject containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown on error converting to a JSONObject
      +
      +
      +
    • +
    • +
      +

      toJSONObject

      +
      public static JSONObject toJSONObject(XMLTokener x) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform. Each XML tag is represented as + a JSONObject with a "tagName" property. If the tag has attributes, then + the attributes will be in the JSONObject as properties. If the tag + contains children, the object will have a "childNodes" property which + will be an array of strings and JsonML JSONObjects. + + Comments, prologs, DTDs, and
      &lt;[ [ ]]>
      are ignored.
      +
      +
      Parameters:
      +
      x - An XMLTokener of the XML source text.
      +
      Returns:
      +
      A JSONObject containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown on error converting to a JSONObject
      +
      +
      +
    • +
    • +
      +

      toJSONObject

      +
      public static JSONObject toJSONObject(XMLTokener x, + boolean keepStrings) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform. Each XML tag is represented as + a JSONObject with a "tagName" property. If the tag has attributes, then + the attributes will be in the JSONObject as properties. If the tag + contains children, the object will have a "childNodes" property which + will be an array of strings and JsonML JSONObjects. + + Comments, prologs, DTDs, and
      &lt;[ [ ]]>
      are ignored.
      +
      +
      Parameters:
      +
      x - An XMLTokener of the XML source text.
      +
      keepStrings - If true, then values will not be coerced into boolean + or numeric values and will instead be left as strings
      +
      Returns:
      +
      A JSONObject containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown on error converting to a JSONObject
      +
      +
      +
    • +
    • +
      +

      toJSONObject

      +
      public static JSONObject toJSONObject(XMLTokener x, + JSONMLParserConfiguration config) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject using the JsonML transform. Each XML tag is represented as + a JSONObject with a "tagName" property. If the tag has attributes, then + the attributes will be in the JSONObject as properties. If the tag + contains children, the object will have a "childNodes" property which + will be an array of strings and JsonML JSONObjects. + + Comments, prologs, DTDs, and
      &lt;[ [ ]]>
      are ignored.
      +
      +
      Parameters:
      +
      x - An XMLTokener of the XML source text.
      +
      config - The parser configuration: + JSONMLParserConfiguration.ORIGINAL is the default behaviour; + JSONMLParserConfiguration.KEEP_STRINGS means values will not be coerced into boolean + or numeric values and will instead be left as strings
      +
      Returns:
      +
      A JSONObject containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown on error converting to a JSONObject
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public static String toString(JSONArray ja) + throws JSONException
      +
      Reverse the JSONML transformation, making an XML text from a JSONArray.
      +
      +
      Parameters:
      +
      ja - A JSONArray.
      +
      Returns:
      +
      An XML string.
      +
      Throws:
      +
      JSONException - Thrown on error converting to a string
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public static String toString(JSONObject jo) + throws JSONException
      +
      Reverse the JSONML transformation, making an XML text from a JSONObject. + The JSONObject must contain a "tagName" property. If it has children, + then it must have a "childNodes" property containing an array of objects. + The other properties are attributes with string values.
      +
      +
      Parameters:
      +
      jo - A JSONObject.
      +
      Returns:
      +
      An XML string.
      +
      Throws:
      +
      JSONException - Thrown on error converting to a string
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/JSONMLParserConfiguration.html b/src/main/java/JSON-Java/org/json/JSONMLParserConfiguration.html new file mode 100644 index 0000000..824d888 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/JSONMLParserConfiguration.html @@ -0,0 +1,312 @@ + + + + +JSONMLParserConfiguration + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class JSONMLParserConfiguration

+
+
java.lang.Object +
org.json.ParserConfiguration +
org.json.JSONMLParserConfiguration
+
+
+
+
+
public class JSONMLParserConfiguration +extends ParserConfiguration
+
Configuration object for the XML to JSONML parser. The configuration is immutable.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      DEFAULT_MAXIMUM_NESTING_DEPTH

      +
      public static final int DEFAULT_MAXIMUM_NESTING_DEPTH
      +
      We can override the default maximum nesting depth if needed.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      ORIGINAL

      +
      public static final JSONMLParserConfiguration ORIGINAL
      +
      Original Configuration of the XML to JSONML Parser.
      +
      +
    • +
    • +
      +

      KEEP_STRINGS

      +
      public static final JSONMLParserConfiguration KEEP_STRINGS
      +
      Original configuration of the XML to JSONML Parser except that values are kept as strings.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      JSONMLParserConfiguration

      +
      public JSONMLParserConfiguration()
      +
      Default parser configuration. Does not keep strings (tries to implicitly convert values).
      +
      +
    • +
    • +
      +

      JSONMLParserConfiguration

      +
      protected JSONMLParserConfiguration(boolean keepStrings, + int maxNestingDepth)
      +
      Configure the parser string processing and use the default CDATA Tag Name as "content".
      +
      +
      Parameters:
      +
      keepStrings - true to parse all values as string. + false to try and convert XML string values into a JSON value.
      +
      maxNestingDepth - int to limit the nesting depth
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      clone

      +
      protected JSONMLParserConfiguration clone()
      +
      Provides a new instance of the same configuration.
      +
      +
      Overrides:
      +
      clone in class ParserConfiguration
      +
      +
      +
    • +
    • +
      +

      withKeepStrings

      +
      public JSONMLParserConfiguration withKeepStrings(boolean newVal)
      +
      Description copied from class: ParserConfiguration
      +
      When parsing the XML into JSONML, specifies if values should be kept as strings (true), or if + they should try to be guessed into JSON values (numeric, boolean, string)
      +
      +
      Overrides:
      +
      withKeepStrings in class ParserConfiguration
      +
      Parameters:
      +
      newVal - new value to use for the keepStrings configuration option.
      +
      Returns:
      +
      The existing configuration will not be modified. A new configuration is returned.
      +
      +
      +
    • +
    • +
      +

      withMaxNestingDepth

      +
      public JSONMLParserConfiguration withMaxNestingDepth(int maxNestingDepth)
      +
      Description copied from class: ParserConfiguration
      +
      Defines the maximum nesting depth that the parser will descend before throwing an exception + when parsing the XML into JSONML. The default max nesting depth is 512, which means the parser + will throw a JsonException if the maximum depth is reached. + Using any negative value as a parameter is equivalent to setting no limit to the nesting depth, + which means the parses will go as deep as the maximum call stack size allows.
      +
      +
      Overrides:
      +
      withMaxNestingDepth in class ParserConfiguration
      +
      Parameters:
      +
      maxNestingDepth - the maximum nesting depth allowed to the XML parser
      +
      Returns:
      +
      The existing configuration will not be modified. A new configuration is returned.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/JSONObject.html b/src/main/java/JSON-Java/org/json/JSONObject.html new file mode 100644 index 0000000..2140246 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/JSONObject.html @@ -0,0 +1,2629 @@ + + + + +JSONObject + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class JSONObject

+
+
java.lang.Object +
org.json.JSONObject
+
+
+
+
public class JSONObject +extends Object
+
A JSONObject is an unordered collection of name/value pairs. Its external + form is a string wrapped in curly braces with colons between the names and + values, and commas between the values and names. The internal form is an + object having get and opt methods for accessing + the values by name, and put methods for adding or replacing + values by name. The values can be any of these types: Boolean, + JSONArray, JSONObject, Number, + String, or the JSONObject.NULL object. A + JSONObject constructor can be used to convert an external form JSON text + into an internal form whose values can be retrieved with the + get and opt methods, or to convert values into a + JSON text using the put and toString methods. A + get method returns a value if one can be found, and throws an + exception if one cannot be found. An opt method returns a + default value instead of throwing an exception, and so is useful for + obtaining optional values. +

+ The generic get() and opt() methods return an + object, which you can cast or query for type. There are also typed + get and opt methods that do type checking and type + coercion for you. The opt methods differ from the get methods in that they + do not throw. Instead, they return a specified value, such as null. +

+ The put methods add or replace values in an object. For + example, + +

+ myString = new JSONObject()
+         .put("JSON", "Hello, World!").toString();
+ 
+ + produces the string {"JSON": "Hello, World"}. +

+ The texts produced by the toString methods strictly conform to + the JSON syntax rules. The constructors are more forgiving in the texts they + will accept: +

    +
  • An extra , (comma) may appear just + before the closing brace.
  • +
  • Strings may be quoted with ' (single + quote).
  • +
  • Strings do not need to be quoted at all if they do not begin with a + quote or single quote, and if they do not contain leading or trailing + spaces, and if they do not contain any of these characters: + { } [ ] / \ : , # and if they do not look like numbers and + if they are not the reserved words true, false, + or null.
  • +
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static final Object
    + +
    +
    It is sometimes more convenient and less ambiguous to have a + NULL object than to use Java's null value.
    +
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Modifier
    +
    Constructor
    +
    Description
    +
     
    + +
    +
    Construct an empty JSONObject.
    +
    +
    protected
    +
    JSONObject(int initialCapacity)
    +
    +
    Constructor to specify an initial capacity of the internal map.
    +
    +
     
    + +
    +
    Construct a JSONObject from an Object using bean getters.
    +
    +
     
    +
    JSONObject(Object object, + String... names)
    +
    +
    Construct a JSONObject from an Object, using reflection to find the + public members.
    +
    +
     
    + +
    +
    Construct a JSONObject from a source JSON text string.
    +
    +
     
    +
    JSONObject(String baseName, + Locale locale)
    +
    +
    Construct a JSONObject from a ResourceBundle.
    +
    +
     
    +
    JSONObject(Map<?,?> m)
    +
    +
    Construct a JSONObject from a Map.
    +
    +
     
    +
    JSONObject(Map<?,?> m, + JSONParserConfiguration jsonParserConfiguration)
    +
    +
    Construct a JSONObject from a Map with custom json parse configurations.
    +
    +
     
    +
    JSONObject(JSONObject jo, + String... names)
    +
    +
    Construct a JSONObject from a subset of another JSONObject.
    +
    +
     
    + +
    +
    Construct a JSONObject from a JSONTokener.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + +
    accumulate(String key, + Object value)
    +
    +
    Accumulate values under a key.
    +
    + +
    append(String key, + Object value)
    +
    +
    Append values to the array under a key.
    +
    +
    void
    + +
    +
    Removes all of the elements from this JSONObject.
    +
    +
    static String
    +
    doubleToString(double d)
    +
    +
    Produce a string from a double.
    +
    + + +
    +
    Get a set of entries of the JSONObject.
    +
    + +
    get(String key)
    +
    +
    Get the value object associated with a key.
    +
    + + +
    +
    Get the BigDecimal value associated with a key.
    +
    + + +
    +
    Get the BigInteger value associated with a key.
    +
    +
    boolean
    + +
    +
    Get the boolean value associated with a key.
    +
    +
    double
    + +
    +
    Get the double value associated with a key.
    +
    +
    <E extends Enum<E>>
    E
    +
    getEnum(Class<E> clazz, + String key)
    +
    +
    Get the enum value associated with a key.
    +
    +
    float
    + +
    +
    Get the float value associated with a key.
    +
    +
    int
    + +
    +
    Get the int value associated with a key.
    +
    + + +
    +
    Get the JSONArray value associated with a key.
    +
    + + +
    +
    Get the JSONObject value associated with a key.
    +
    +
    long
    + +
    +
    Get the long value associated with a key.
    +
    +
    Class<? extends Map>
    + +
    +
    Retrieves the type of the underlying Map in this class.
    +
    +
    static String[]
    +
    getNames(Object object)
    +
    +
    Get an array of public field names from an Object.
    +
    +
    static String[]
    + +
    +
    Get an array of field names from a JSONObject.
    +
    + + +
    +
    Get the Number value associated with a key.
    +
    + + +
    +
    Get the string associated with a key.
    +
    +
    boolean
    +
    has(String key)
    +
    +
    Determine if the JSONObject contains a specific key.
    +
    + + +
    +
    Increment a property of a JSONObject.
    +
    +
    protected static boolean
    + +
    +
    Tests if the value should be tried as a decimal.
    +
    +
    boolean
    + +
    +
    Check if JSONObject is empty.
    +
    +
    boolean
    + +
    +
    Determine if the value associated with the key is null or if there is no + value.
    +
    + + +
    +
    Get an enumeration of the keys of the JSONObject.
    +
    + + +
    +
    Get a set of keys of the JSONObject.
    +
    +
    int
    + +
    +
    Get the number of keys stored in the JSONObject.
    +
    + + +
    +
    Produce a JSONArray containing the names of the elements of this + JSONObject.
    +
    +
    static String
    + +
    +
    Produce a string from a Number.
    +
    + +
    opt(String key)
    +
    +
    Get an optional value associated with a key.
    +
    + +
    optBigDecimal(String key, + BigDecimal defaultValue)
    +
    +
    Get an optional BigDecimal associated with a key, or the defaultValue if + there is no such key or if its value is not a number.
    +
    + +
    optBigInteger(String key, + BigInteger defaultValue)
    +
    +
    Get an optional BigInteger associated with a key, or the defaultValue if + there is no such key or if its value is not a number.
    +
    +
    boolean
    + +
    +
    Get an optional boolean associated with a key.
    +
    +
    boolean
    +
    optBoolean(String key, + boolean defaultValue)
    +
    +
    Get an optional boolean associated with a key.
    +
    + + +
    +
    Get an optional boolean object associated with a key.
    +
    + +
    optBooleanObject(String key, + Boolean defaultValue)
    +
    +
    Get an optional boolean object associated with a key.
    +
    +
    double
    + +
    +
    Get an optional double associated with a key, or NaN if there is no such + key or if its value is not a number.
    +
    +
    double
    +
    optDouble(String key, + double defaultValue)
    +
    +
    Get an optional double associated with a key, or the defaultValue if + there is no such key or if its value is not a number.
    +
    + + +
    +
    Get an optional Double object associated with a key, or NaN if there is no such + key or if its value is not a number.
    +
    + +
    optDoubleObject(String key, + Double defaultValue)
    +
    +
    Get an optional Double object associated with a key, or the defaultValue if + there is no such key or if its value is not a number.
    +
    +
    <E extends Enum<E>>
    E
    +
    optEnum(Class<E> clazz, + String key)
    +
    +
    Get the enum value associated with a key.
    +
    +
    <E extends Enum<E>>
    E
    +
    optEnum(Class<E> clazz, + String key, + E defaultValue)
    +
    +
    Get the enum value associated with a key.
    +
    +
    float
    + +
    +
    Get the optional float value associated with an index.
    +
    +
    float
    +
    optFloat(String key, + float defaultValue)
    +
    +
    Get the optional float value associated with an index.
    +
    + + +
    +
    Get the optional Float object associated with an index.
    +
    + +
    optFloatObject(String key, + Float defaultValue)
    +
    +
    Get the optional Float object associated with an index.
    +
    +
    int
    + +
    +
    Get an optional int value associated with a key, or zero if there is no + such key or if the value is not a number.
    +
    +
    int
    +
    optInt(String key, + int defaultValue)
    +
    +
    Get an optional int value associated with a key, or the default if there + is no such key or if the value is not a number.
    +
    + + +
    +
    Get an optional Integer object associated with a key, or zero if there is no + such key or if the value is not a number.
    +
    + +
    optIntegerObject(String key, + Integer defaultValue)
    +
    +
    Get an optional Integer object associated with a key, or the default if there + is no such key or if the value is not a number.
    +
    + + +
    +
    Get an optional JSONArray associated with a key.
    +
    + +
    optJSONArray(String key, + JSONArray defaultValue)
    +
    +
    Get an optional JSONArray associated with a key, or the default if there + is no such key, or if its value is not a JSONArray.
    +
    + + +
    +
    Get an optional JSONObject associated with a key.
    +
    + +
    optJSONObject(String key, + JSONObject defaultValue)
    +
    +
    Get an optional JSONObject associated with a key, or the default if there + is no such key or if the value is not a JSONObject.
    +
    +
    long
    + +
    +
    Get an optional long value associated with a key, or zero if there is no + such key or if the value is not a number.
    +
    +
    long
    +
    optLong(String key, + long defaultValue)
    +
    +
    Get an optional long value associated with a key, or the default if there + is no such key or if the value is not a number.
    +
    + + +
    +
    Get an optional Long object associated with a key, or zero if there is no + such key or if the value is not a number.
    +
    + +
    optLongObject(String key, + Long defaultValue)
    +
    +
    Get an optional Long object associated with a key, or the default if there + is no such key or if the value is not a number.
    +
    + + +
    +
    Get an optional Number value associated with a key, or null + if there is no such key or if the value is not a number.
    +
    + +
    optNumber(String key, + Number defaultValue)
    +
    +
    Get an optional Number value associated with a key, or the default if there + is no such key or if the value is not a number.
    +
    + +
    optQuery(String jsonPointer)
    +
    +
    Queries and returns a value from this object using jsonPointer, or + returns null if the query fails due to a missing key.
    +
    + +
    optQuery(JSONPointer jsonPointer)
    +
    +
    Queries and returns a value from this object using jsonPointer, or + returns null if the query fails due to a missing key.
    +
    + + +
    +
    Get an optional string associated with a key.
    +
    + +
    optString(String key, + String defaultValue)
    +
    +
    Get an optional string associated with a key.
    +
    + +
    put(String key, + boolean value)
    +
    +
    Put a key/boolean pair in the JSONObject.
    +
    + +
    put(String key, + double value)
    +
    +
    Put a key/double pair in the JSONObject.
    +
    + +
    put(String key, + float value)
    +
    +
    Put a key/float pair in the JSONObject.
    +
    + +
    put(String key, + int value)
    +
    +
    Put a key/int pair in the JSONObject.
    +
    + +
    put(String key, + long value)
    +
    +
    Put a key/long pair in the JSONObject.
    +
    + +
    put(String key, + Object value)
    +
    +
    Put a key/value pair in the JSONObject.
    +
    + +
    put(String key, + Collection<?> value)
    +
    +
    Put a key/value pair in the JSONObject, where the value will be a + JSONArray which is produced from a Collection.
    +
    + +
    put(String key, + Map<?,?> value)
    +
    +
    Put a key/value pair in the JSONObject, where the value will be a + JSONObject which is produced from a Map.
    +
    + +
    putOnce(String key, + Object value)
    +
    +
    Put a key/value pair in the JSONObject, but only if the key and the value + are both non-null, and only if there is not already a member with that + name.
    +
    + +
    putOpt(String key, + Object value)
    +
    +
    Put a key/value pair in the JSONObject, but only if the key and the value + are both non-null.
    +
    + +
    query(String jsonPointer)
    +
    +
    Creates a JSONPointer using an initialization string and tries to + match it to an item within this JSONObject.
    +
    + +
    query(JSONPointer jsonPointer)
    +
    +
    Uses a user initialized JSONPointer and tries to + match it to an item within this JSONObject.
    +
    +
    static String
    +
    quote(String string)
    +
    +
    Produce a string in double quotes with backslash sequences in all the + right places.
    +
    +
    static Writer
    +
    quote(String string, + Writer w)
    +
    +
    Quotes a string and appends the result to a given Writer.
    +
    + + +
    +
    Remove a name and its value, if present.
    +
    +
    boolean
    +
    similar(Object other)
    +
    +
    Determine if two JSONObjects are similar.
    +
    +
    protected static Number
    + +
    +
    Converts a string to a number using the narrowest possible type.
    +
    +
    static Object
    + +
    +
    Try to convert a string into a number, boolean, or null.
    +
    +
    static void
    + +
    +
    Throw an exception if the object is a NaN or infinite number.
    +
    + + +
    +
    Produce a JSONArray containing the values of the members of this + JSONObject.
    +
    + + +
    +
    Returns a java.util.Map containing all of the entries in this object.
    +
    + + +
    +
    Make a JSON text of this JSONObject.
    +
    + +
    toString(int indentFactor)
    +
    +
    Make a pretty-printed JSON text of this JSONObject.
    +
    +
    static String
    + +
    +
    Make a JSON text of an Object value.
    +
    +
    static Object
    +
    wrap(Object object)
    +
    +
    Wrap an object, if necessary.
    +
    + +
    write(Writer writer)
    +
    +
    Write the contents of the JSONObject as JSON text to a writer.
    +
    + +
    write(Writer writer, + int indentFactor, + int indent)
    +
    +
    Write the contents of the JSONObject as JSON text to a writer.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      NULL

      +
      public static final Object NULL
      +
      It is sometimes more convenient and less ambiguous to have a + NULL object than to use Java's null value. + JSONObject.NULL.equals(null) returns true. + JSONObject.NULL.toString() returns "null".
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      JSONObject

      +
      public JSONObject()
      +
      Construct an empty JSONObject.
      +
      +
    • +
    • +
      +

      JSONObject

      +
      public JSONObject(JSONObject jo, + String... names)
      +
      Construct a JSONObject from a subset of another JSONObject. An array of + strings is used to identify the keys that should be copied. Missing keys + are ignored.
      +
      +
      Parameters:
      +
      jo - A JSONObject.
      +
      names - An array of strings.
      +
      +
      +
    • +
    • +
      +

      JSONObject

      +
      public JSONObject(JSONTokener x) + throws JSONException
      +
      Construct a JSONObject from a JSONTokener.
      +
      +
      Parameters:
      +
      x - A JSONTokener object containing the source string.
      +
      Throws:
      +
      JSONException - If there is a syntax error in the source string or a + duplicated key.
      +
      +
      +
    • +
    • +
      +

      JSONObject

      +
      public JSONObject(Map<?,?> m)
      +
      Construct a JSONObject from a Map.
      +
      +
      Parameters:
      +
      m - A map object that can be used to initialize the contents of + the JSONObject.
      +
      Throws:
      +
      JSONException - If a value in the map is non-finite number.
      +
      NullPointerException - If a key in the map is null
      +
      +
      +
    • +
    • +
      +

      JSONObject

      +
      public JSONObject(Map<?,?> m, + JSONParserConfiguration jsonParserConfiguration)
      +
      Construct a JSONObject from a Map with custom json parse configurations.
      +
      +
      Parameters:
      +
      m - A map object that can be used to initialize the contents of + the JSONObject.
      +
      jsonParserConfiguration - Variable to pass parser custom configuration for json parsing.
      +
      +
      +
    • +
    • +
      +

      JSONObject

      +
      public JSONObject(Object bean)
      +
      Construct a JSONObject from an Object using bean getters. It reflects on + all of the public methods of the object. For each of the methods with no + parameters and a name starting with "get" or + "is" followed by an uppercase letter, the method is invoked, + and a key and the value returned from the getter method are put into the + new JSONObject. +

      + The key is formed by removing the "get" or "is" + prefix. If the second remaining character is not upper case, then the + first character is converted to lower case. +

      + Methods that are static, return void, + have parameters, or are "bridge" methods, are ignored. +

      + For example, if an object has a method named "getName", and + if the result of calling object.getName() is + "Larry Fine", then the JSONObject will contain + "name": "Larry Fine". +

      + The JSONPropertyName annotation can be used on a bean getter to + override key name used in the JSONObject. For example, using the object + above with the getName method, if we annotated it with: +

      + @JSONPropertyName("FullName")
      + public String getName() { return this.name; }
      + 
      + The resulting JSON object would contain "FullName": "Larry Fine" +

      + Similarly, the JSONPropertyName annotation can be used on non- + get and is methods. We can also override key + name used in the JSONObject as seen below even though the field would normally + be ignored: +

      + @JSONPropertyName("FullName")
      + public String fullName() { return this.name; }
      + 
      + The resulting JSON object would contain "FullName": "Larry Fine" +

      + The JSONPropertyIgnore annotation can be used to force the bean property + to not be serialized into JSON. If both JSONPropertyIgnore and + JSONPropertyName are defined on the same method, a depth comparison is + performed and the one closest to the concrete class being serialized is used. + If both annotations are at the same level, then the JSONPropertyIgnore + annotation takes precedent and the field is not serialized. + For example, the following declaration would prevent the getName + method from being serialized: +

      + @JSONPropertyName("FullName")
      + @JSONPropertyIgnore
      + public String getName() { return this.name; }
      + 
      +
      +
      Parameters:
      +
      bean - An object that has getter methods that should be used to make + a JSONObject.
      +
      Throws:
      +
      JSONException - If a getter returned a non-finite number.
      +
      +
      +
    • +
    • +
      +

      JSONObject

      +
      public JSONObject(Object object, + String... names)
      +
      Construct a JSONObject from an Object, using reflection to find the + public members. The resulting JSONObject's keys will be the strings from + the names array, and the values will be the field values associated with + those keys in the object. If a key is not found or not visible, then it + will not be copied into the new JSONObject.
      +
      +
      Parameters:
      +
      object - An object that has fields that should be used to make a + JSONObject.
      +
      names - An array of strings, the names of the fields to be obtained + from the object.
      +
      +
      +
    • +
    • +
      +

      JSONObject

      +
      public JSONObject(String source) + throws JSONException
      +
      Construct a JSONObject from a source JSON text string. This is the most + commonly used JSONObject constructor.
      +
      +
      Parameters:
      +
      source - A string beginning with { (left + brace) and ending with } +  (right brace).
      +
      Throws:
      +
      JSONException - If there is a syntax error in the source string or a + duplicated key.
      +
      +
      +
    • +
    • +
      +

      JSONObject

      +
      public JSONObject(String baseName, + Locale locale) + throws JSONException
      +
      Construct a JSONObject from a ResourceBundle.
      +
      +
      Parameters:
      +
      baseName - The ResourceBundle base name.
      +
      locale - The Locale to load the ResourceBundle for.
      +
      Throws:
      +
      JSONException - If any JSONExceptions are detected.
      +
      +
      +
    • +
    • +
      +

      JSONObject

      +
      protected JSONObject(int initialCapacity)
      +
      Constructor to specify an initial capacity of the internal map. Useful for library + internal calls where we know, or at least can best guess, how big this JSONObject + will be.
      +
      +
      Parameters:
      +
      initialCapacity - initial capacity of the internal map.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getMapType

      +
      public Class<? extends Map> getMapType()
      +
      Retrieves the type of the underlying Map in this class.
      +
      +
      Returns:
      +
      The class object representing the type of the underlying Map.
      +
      +
      +
    • +
    • +
      +

      accumulate

      +
      public JSONObject accumulate(String key, + Object value) + throws JSONException
      +
      Accumulate values under a key. It is similar to the put method except + that if there is already an object stored under the key then a JSONArray + is stored under the key to hold all of the accumulated values. If there + is already a JSONArray, then the new value is appended to it. In + contrast, the put method replaces the previous value. + + If only one value is accumulated that is not a JSONArray, then the result + will be the same as using put. But if multiple values are accumulated, + then the result will be like append.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      value - An object to be accumulated under the key.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the value is non-finite number.
      +
      NullPointerException - If the key is null.
      +
      +
      +
    • +
    • +
      +

      append

      +
      public JSONObject append(String key, + Object value) + throws JSONException
      +
      Append values to the array under a key. If the key does not exist in the + JSONObject, then the key is put in the JSONObject with its value being a + JSONArray containing the value parameter. If the key was already + associated with a JSONArray, then the value parameter is appended to it.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      value - An object to be accumulated under the key.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the value is non-finite number or if the current value associated with + the key is not a JSONArray.
      +
      NullPointerException - If the key is null.
      +
      +
      +
    • +
    • +
      +

      doubleToString

      +
      public static String doubleToString(double d)
      +
      Produce a string from a double. The string "null" will be returned if the + number is not finite.
      +
      +
      Parameters:
      +
      d - A double.
      +
      Returns:
      +
      A String.
      +
      +
      +
    • +
    • +
      +

      get

      +
      public Object get(String key) + throws JSONException
      +
      Get the value object associated with a key.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      The object associated with the key.
      +
      Throws:
      +
      JSONException - if the key is not found.
      +
      +
      +
    • +
    • +
      +

      getEnum

      +
      public <E extends Enum<E>> E getEnum(Class<E> clazz, + String key) + throws JSONException
      +
      Get the enum value associated with a key.
      +
      +
      Type Parameters:
      +
      E - Enum Type
      +
      Parameters:
      +
      clazz - The type of enum to retrieve.
      +
      key - A key string.
      +
      Returns:
      +
      The enum value associated with the key
      +
      Throws:
      +
      JSONException - if the key is not found or if the value cannot be converted + to an enum.
      +
      +
      +
    • +
    • +
      +

      getBoolean

      +
      public boolean getBoolean(String key) + throws JSONException
      +
      Get the boolean value associated with a key.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      The truth.
      +
      Throws:
      +
      JSONException - if the value is not a Boolean or the String "true" or + "false".
      +
      +
      +
    • +
    • +
      +

      getBigInteger

      +
      public BigInteger getBigInteger(String key) + throws JSONException
      +
      Get the BigInteger value associated with a key.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      The numeric value.
      +
      Throws:
      +
      JSONException - if the key is not found or if the value cannot + be converted to BigInteger.
      +
      +
      +
    • +
    • +
      +

      getBigDecimal

      +
      public BigDecimal getBigDecimal(String key) + throws JSONException
      +
      Get the BigDecimal value associated with a key. If the value is float or + double, the BigDecimal(double) constructor will + be used. See notes on the constructor for conversion issues that may + arise.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      The numeric value.
      +
      Throws:
      +
      JSONException - if the key is not found or if the value + cannot be converted to BigDecimal.
      +
      +
      +
    • +
    • +
      +

      getDouble

      +
      public double getDouble(String key) + throws JSONException
      +
      Get the double value associated with a key.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      The numeric value.
      +
      Throws:
      +
      JSONException - if the key is not found or if the value is not a Number + object and cannot be converted to a number.
      +
      +
      +
    • +
    • +
      +

      getFloat

      +
      public float getFloat(String key) + throws JSONException
      +
      Get the float value associated with a key.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      The numeric value.
      +
      Throws:
      +
      JSONException - if the key is not found or if the value is not a Number + object and cannot be converted to a number.
      +
      +
      +
    • +
    • +
      +

      getNumber

      +
      public Number getNumber(String key) + throws JSONException
      +
      Get the Number value associated with a key.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      The numeric value.
      +
      Throws:
      +
      JSONException - if the key is not found or if the value is not a Number + object and cannot be converted to a number.
      +
      +
      +
    • +
    • +
      +

      getInt

      +
      public int getInt(String key) + throws JSONException
      +
      Get the int value associated with a key.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      The integer value.
      +
      Throws:
      +
      JSONException - if the key is not found or if the value cannot be converted + to an integer.
      +
      +
      +
    • +
    • +
      +

      getJSONArray

      +
      public JSONArray getJSONArray(String key) + throws JSONException
      +
      Get the JSONArray value associated with a key.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      A JSONArray which is the value.
      +
      Throws:
      +
      JSONException - if the key is not found or if the value is not a JSONArray.
      +
      +
      +
    • +
    • +
      +

      getJSONObject

      +
      public JSONObject getJSONObject(String key) + throws JSONException
      +
      Get the JSONObject value associated with a key.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      A JSONObject which is the value.
      +
      Throws:
      +
      JSONException - if the key is not found or if the value is not a JSONObject.
      +
      +
      +
    • +
    • +
      +

      getLong

      +
      public long getLong(String key) + throws JSONException
      +
      Get the long value associated with a key.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      The long value.
      +
      Throws:
      +
      JSONException - if the key is not found or if the value cannot be converted + to a long.
      +
      +
      +
    • +
    • +
      +

      getNames

      +
      public static String[] getNames(JSONObject jo)
      +
      Get an array of field names from a JSONObject.
      +
      +
      Parameters:
      +
      jo - JSON object
      +
      Returns:
      +
      An array of field names, or null if there are no names.
      +
      +
      +
    • +
    • +
      +

      getNames

      +
      public static String[] getNames(Object object)
      +
      Get an array of public field names from an Object.
      +
      +
      Parameters:
      +
      object - object to read
      +
      Returns:
      +
      An array of field names, or null if there are no names.
      +
      +
      +
    • +
    • +
      +

      getString

      +
      public String getString(String key) + throws JSONException
      +
      Get the string associated with a key.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      A string which is the value.
      +
      Throws:
      +
      JSONException - if there is no string value for the key.
      +
      +
      +
    • +
    • +
      +

      has

      +
      public boolean has(String key)
      +
      Determine if the JSONObject contains a specific key.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      true if the key exists in the JSONObject.
      +
      +
      +
    • +
    • +
      +

      increment

      +
      public JSONObject increment(String key) + throws JSONException
      +
      Increment a property of a JSONObject. If there is no such property, + create one with a value of 1 (Integer). If there is such a property, and if it is + an Integer, Long, Double, Float, BigInteger, or BigDecimal then add one to it. + No overflow bounds checking is performed, so callers should initialize the key + prior to this call with an appropriate type that can handle the maximum expected + value.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If there is already a property with this name that is not an + Integer, Long, Double, or Float.
      +
      +
      +
    • +
    • +
      +

      isNull

      +
      public boolean isNull(String key)
      +
      Determine if the value associated with the key is null or if there is no + value.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      true if there is no value associated with the key or if the value + is the JSONObject.NULL object.
      +
      +
      +
    • +
    • +
      +

      keys

      +
      public Iterator<String> keys()
      +
      Get an enumeration of the keys of the JSONObject. Modifying this key Set will also + modify the JSONObject. Use with caution.
      +
      +
      Returns:
      +
      An iterator of the keys.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      keySet

      +
      public Set<String> keySet()
      +
      Get a set of keys of the JSONObject. Modifying this key Set will also modify the + JSONObject. Use with caution.
      +
      +
      Returns:
      +
      A keySet.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      entrySet

      +
      protected Set<Map.Entry<String,Object>> entrySet()
      +
      Get a set of entries of the JSONObject. These are raw values and may not + match what is returned by the JSONObject get* and opt* functions. Modifying + the returned EntrySet or the Entry objects contained therein will modify the + backing JSONObject. This does not return a clone or a read-only view. + + Use with caution.
      +
      +
      Returns:
      +
      An Entry Set
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      length

      +
      public int length()
      +
      Get the number of keys stored in the JSONObject.
      +
      +
      Returns:
      +
      The number of keys in the JSONObject.
      +
      +
      +
    • +
    • +
      +

      clear

      +
      public void clear()
      +
      Removes all of the elements from this JSONObject. + The JSONObject will be empty after this call returns.
      +
      +
    • +
    • +
      +

      isEmpty

      +
      public boolean isEmpty()
      +
      Check if JSONObject is empty.
      +
      +
      Returns:
      +
      true if JSONObject is empty, otherwise false.
      +
      +
      +
    • +
    • +
      +

      names

      +
      public JSONArray names()
      +
      Produce a JSONArray containing the names of the elements of this + JSONObject.
      +
      +
      Returns:
      +
      A JSONArray containing the key strings, or null if the JSONObject + is empty.
      +
      +
      +
    • +
    • +
      +

      numberToString

      +
      public static String numberToString(Number number) + throws JSONException
      +
      Produce a string from a Number.
      +
      +
      Parameters:
      +
      number - A Number
      +
      Returns:
      +
      A String.
      +
      Throws:
      +
      JSONException - If n is a non-finite number.
      +
      +
      +
    • +
    • +
      +

      opt

      +
      public Object opt(String key)
      +
      Get an optional value associated with a key.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      An object which is the value, or null if there is no value.
      +
      +
      +
    • +
    • +
      +

      optEnum

      +
      public <E extends Enum<E>> E optEnum(Class<E> clazz, + String key)
      +
      Get the enum value associated with a key.
      +
      +
      Type Parameters:
      +
      E - Enum Type
      +
      Parameters:
      +
      clazz - The type of enum to retrieve.
      +
      key - A key string.
      +
      Returns:
      +
      The enum value associated with the key or null if not found
      +
      +
      +
    • +
    • +
      +

      optEnum

      +
      public <E extends Enum<E>> E optEnum(Class<E> clazz, + String key, + E defaultValue)
      +
      Get the enum value associated with a key.
      +
      +
      Type Parameters:
      +
      E - Enum Type
      +
      Parameters:
      +
      clazz - The type of enum to retrieve.
      +
      key - A key string.
      +
      defaultValue - The default in case the value is not found
      +
      Returns:
      +
      The enum value associated with the key or defaultValue + if the value is not found or cannot be assigned to clazz
      +
      +
      +
    • +
    • +
      +

      optBoolean

      +
      public boolean optBoolean(String key)
      +
      Get an optional boolean associated with a key. It returns false if there + is no such key, or if the value is not Boolean.TRUE or the String "true".
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      The truth.
      +
      +
      +
    • +
    • +
      +

      optBoolean

      +
      public boolean optBoolean(String key, + boolean defaultValue)
      +
      Get an optional boolean associated with a key. It returns the + defaultValue if there is no such key, or if it is not a Boolean or the + String "true" or "false" (case insensitive).
      +
      +
      Parameters:
      +
      key - A key string.
      +
      defaultValue - The default.
      +
      Returns:
      +
      The truth.
      +
      +
      +
    • +
    • +
      +

      optBooleanObject

      +
      public Boolean optBooleanObject(String key)
      +
      Get an optional boolean object associated with a key. It returns false if there + is no such key, or if the value is not Boolean.TRUE or the String "true".
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      The truth.
      +
      +
      +
    • +
    • +
      +

      optBooleanObject

      +
      public Boolean optBooleanObject(String key, + Boolean defaultValue)
      +
      Get an optional boolean object associated with a key. It returns the + defaultValue if there is no such key, or if it is not a Boolean or the + String "true" or "false" (case insensitive).
      +
      +
      Parameters:
      +
      key - A key string.
      +
      defaultValue - The default.
      +
      Returns:
      +
      The truth.
      +
      +
      +
    • +
    • +
      +

      optBigDecimal

      +
      public BigDecimal optBigDecimal(String key, + BigDecimal defaultValue)
      +
      Get an optional BigDecimal associated with a key, or the defaultValue if + there is no such key or if its value is not a number. If the value is a + string, an attempt will be made to evaluate it as a number. If the value + is float or double, then the BigDecimal(double) + constructor will be used. See notes on the constructor for conversion + issues that may arise.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      defaultValue - The default.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optBigInteger

      +
      public BigInteger optBigInteger(String key, + BigInteger defaultValue)
      +
      Get an optional BigInteger associated with a key, or the defaultValue if + there is no such key or if its value is not a number. If the value is a + string, an attempt will be made to evaluate it as a number.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      defaultValue - The default.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optDouble

      +
      public double optDouble(String key)
      +
      Get an optional double associated with a key, or NaN if there is no such + key or if its value is not a number. If the value is a string, an attempt + will be made to evaluate it as a number.
      +
      +
      Parameters:
      +
      key - A string which is the key.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optDouble

      +
      public double optDouble(String key, + double defaultValue)
      +
      Get an optional double associated with a key, or the defaultValue if + there is no such key or if its value is not a number. If the value is a + string, an attempt will be made to evaluate it as a number.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      defaultValue - The default.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optDoubleObject

      +
      public Double optDoubleObject(String key)
      +
      Get an optional Double object associated with a key, or NaN if there is no such + key or if its value is not a number. If the value is a string, an attempt + will be made to evaluate it as a number.
      +
      +
      Parameters:
      +
      key - A string which is the key.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optDoubleObject

      +
      public Double optDoubleObject(String key, + Double defaultValue)
      +
      Get an optional Double object associated with a key, or the defaultValue if + there is no such key or if its value is not a number. If the value is a + string, an attempt will be made to evaluate it as a number.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      defaultValue - The default.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optFloat

      +
      public float optFloat(String key)
      +
      Get the optional float value associated with an index. NaN is returned + if there is no value for the index, or if the value is not a number and + cannot be converted to a number.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      The value.
      +
      +
      +
    • +
    • +
      +

      optFloat

      +
      public float optFloat(String key, + float defaultValue)
      +
      Get the optional float value associated with an index. The defaultValue + is returned if there is no value for the index, or if the value is not a + number and cannot be converted to a number.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      defaultValue - The default value.
      +
      Returns:
      +
      The value.
      +
      +
      +
    • +
    • +
      +

      optFloatObject

      +
      public Float optFloatObject(String key)
      +
      Get the optional Float object associated with an index. NaN is returned + if there is no value for the index, or if the value is not a number and + cannot be converted to a number.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      The object.
      +
      +
      +
    • +
    • +
      +

      optFloatObject

      +
      public Float optFloatObject(String key, + Float defaultValue)
      +
      Get the optional Float object associated with an index. The defaultValue + is returned if there is no value for the index, or if the value is not a + number and cannot be converted to a number.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      defaultValue - The default object.
      +
      Returns:
      +
      The object.
      +
      +
      +
    • +
    • +
      +

      optInt

      +
      public int optInt(String key)
      +
      Get an optional int value associated with a key, or zero if there is no + such key or if the value is not a number. If the value is a string, an + attempt will be made to evaluate it as a number.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optInt

      +
      public int optInt(String key, + int defaultValue)
      +
      Get an optional int value associated with a key, or the default if there + is no such key or if the value is not a number. If the value is a string, + an attempt will be made to evaluate it as a number.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      defaultValue - The default.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optIntegerObject

      +
      public Integer optIntegerObject(String key)
      +
      Get an optional Integer object associated with a key, or zero if there is no + such key or if the value is not a number. If the value is a string, an + attempt will be made to evaluate it as a number.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optIntegerObject

      +
      public Integer optIntegerObject(String key, + Integer defaultValue)
      +
      Get an optional Integer object associated with a key, or the default if there + is no such key or if the value is not a number. If the value is a string, + an attempt will be made to evaluate it as a number.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      defaultValue - The default.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optJSONArray

      +
      public JSONArray optJSONArray(String key)
      +
      Get an optional JSONArray associated with a key. It returns null if there + is no such key, or if its value is not a JSONArray.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      A JSONArray which is the value.
      +
      +
      +
    • +
    • +
      +

      optJSONArray

      +
      public JSONArray optJSONArray(String key, + JSONArray defaultValue)
      +
      Get an optional JSONArray associated with a key, or the default if there + is no such key, or if its value is not a JSONArray.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      defaultValue - The default.
      +
      Returns:
      +
      A JSONArray which is the value.
      +
      +
      +
    • +
    • +
      +

      optJSONObject

      +
      public JSONObject optJSONObject(String key)
      +
      Get an optional JSONObject associated with a key. It returns null if + there is no such key, or if its value is not a JSONObject.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      A JSONObject which is the value.
      +
      +
      +
    • +
    • +
      +

      optJSONObject

      +
      public JSONObject optJSONObject(String key, + JSONObject defaultValue)
      +
      Get an optional JSONObject associated with a key, or the default if there + is no such key or if the value is not a JSONObject.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      defaultValue - The default.
      +
      Returns:
      +
      An JSONObject which is the value.
      +
      +
      +
    • +
    • +
      +

      optLong

      +
      public long optLong(String key)
      +
      Get an optional long value associated with a key, or zero if there is no + such key or if the value is not a number. If the value is a string, an + attempt will be made to evaluate it as a number.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optLong

      +
      public long optLong(String key, + long defaultValue)
      +
      Get an optional long value associated with a key, or the default if there + is no such key or if the value is not a number. If the value is a string, + an attempt will be made to evaluate it as a number.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      defaultValue - The default.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optLongObject

      +
      public Long optLongObject(String key)
      +
      Get an optional Long object associated with a key, or zero if there is no + such key or if the value is not a number. If the value is a string, an + attempt will be made to evaluate it as a number.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optLongObject

      +
      public Long optLongObject(String key, + Long defaultValue)
      +
      Get an optional Long object associated with a key, or the default if there + is no such key or if the value is not a number. If the value is a string, + an attempt will be made to evaluate it as a number.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      defaultValue - The default.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optNumber

      +
      public Number optNumber(String key)
      +
      Get an optional Number value associated with a key, or null + if there is no such key or if the value is not a number. If the value is a string, + an attempt will be made to evaluate it as a number (BigDecimal). This method + would be used in cases where type coercion of the number value is unwanted.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optNumber

      +
      public Number optNumber(String key, + Number defaultValue)
      +
      Get an optional Number value associated with a key, or the default if there + is no such key or if the value is not a number. If the value is a string, + an attempt will be made to evaluate it as a number. This method + would be used in cases where type coercion of the number value is unwanted.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      defaultValue - The default.
      +
      Returns:
      +
      An object which is the value.
      +
      +
      +
    • +
    • +
      +

      optString

      +
      public String optString(String key)
      +
      Get an optional string associated with a key. It returns an empty string + if there is no such key. If the value is not a string and is not null, + then it is converted to a string.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      Returns:
      +
      A string which is the value.
      +
      +
      +
    • +
    • +
      +

      optString

      +
      public String optString(String key, + String defaultValue)
      +
      Get an optional string associated with a key. It returns the defaultValue + if there is no such key.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      defaultValue - The default.
      +
      Returns:
      +
      A string which is the value.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONObject put(String key, + boolean value) + throws JSONException
      +
      Put a key/boolean pair in the JSONObject.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      value - A boolean which is the value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the value is non-finite number.
      +
      NullPointerException - If the key is null.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONObject put(String key, + Collection<?> value) + throws JSONException
      +
      Put a key/value pair in the JSONObject, where the value will be a + JSONArray which is produced from a Collection.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      value - A Collection value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the value is non-finite number.
      +
      NullPointerException - If the key is null.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONObject put(String key, + double value) + throws JSONException
      +
      Put a key/double pair in the JSONObject.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      value - A double which is the value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the value is non-finite number.
      +
      NullPointerException - If the key is null.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONObject put(String key, + float value) + throws JSONException
      +
      Put a key/float pair in the JSONObject.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      value - A float which is the value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the value is non-finite number.
      +
      NullPointerException - If the key is null.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONObject put(String key, + int value) + throws JSONException
      +
      Put a key/int pair in the JSONObject.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      value - An int which is the value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the value is non-finite number.
      +
      NullPointerException - If the key is null.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONObject put(String key, + long value) + throws JSONException
      +
      Put a key/long pair in the JSONObject.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      value - A long which is the value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the value is non-finite number.
      +
      NullPointerException - If the key is null.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONObject put(String key, + Map<?,?> value) + throws JSONException
      +
      Put a key/value pair in the JSONObject, where the value will be a + JSONObject which is produced from a Map.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      value - A Map value.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the value is non-finite number.
      +
      NullPointerException - If the key is null.
      +
      +
      +
    • +
    • +
      +

      put

      +
      public JSONObject put(String key, + Object value) + throws JSONException
      +
      Put a key/value pair in the JSONObject. If the value is null, then the + key will be removed from the JSONObject if it is present.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      value - An object which is the value. It should be of one of these + types: Boolean, Double, Integer, JSONArray, JSONObject, Long, + String, or the JSONObject.NULL object.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the value is non-finite number.
      +
      NullPointerException - If the key is null.
      +
      +
      +
    • +
    • +
      +

      putOnce

      +
      public JSONObject putOnce(String key, + Object value) + throws JSONException
      +
      Put a key/value pair in the JSONObject, but only if the key and the value + are both non-null, and only if there is not already a member with that + name.
      +
      +
      Parameters:
      +
      key - key to insert into
      +
      value - value to insert
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - if the key is a duplicate
      +
      +
      +
    • +
    • +
      +

      putOpt

      +
      public JSONObject putOpt(String key, + Object value) + throws JSONException
      +
      Put a key/value pair in the JSONObject, but only if the key and the value + are both non-null.
      +
      +
      Parameters:
      +
      key - A key string.
      +
      value - An object which is the value. It should be of one of these + types: Boolean, Double, Integer, JSONArray, JSONObject, Long, + String, or the JSONObject.NULL object.
      +
      Returns:
      +
      this.
      +
      Throws:
      +
      JSONException - If the value is a non-finite number.
      +
      +
      +
    • +
    • +
      +

      query

      +
      public Object query(String jsonPointer)
      +
      Creates a JSONPointer using an initialization string and tries to + match it to an item within this JSONObject. For example, given a + JSONObject initialized with this document: +
      + {
      +     "a":{"b":"c"}
      + }
      + 
      + and this JSONPointer string: +
      + "/a/b"
      + 
      + Then this method will return the String "c". + A JSONPointerException may be thrown from code called by this method.
      +
      +
      Parameters:
      +
      jsonPointer - string that can be used to create a JSONPointer
      +
      Returns:
      +
      the item matched by the JSONPointer, otherwise null
      +
      +
      +
    • +
    • +
      +

      query

      +
      public Object query(JSONPointer jsonPointer)
      +
      Uses a user initialized JSONPointer and tries to + match it to an item within this JSONObject. For example, given a + JSONObject initialized with this document: +
      + {
      +     "a":{"b":"c"}
      + }
      + 
      + and this JSONPointer: +
      + "/a/b"
      + 
      + Then this method will return the String "c". + A JSONPointerException may be thrown from code called by this method.
      +
      +
      Parameters:
      +
      jsonPointer - string that can be used to create a JSONPointer
      +
      Returns:
      +
      the item matched by the JSONPointer, otherwise null
      +
      +
      +
    • +
    • +
      +

      optQuery

      +
      public Object optQuery(String jsonPointer)
      +
      Queries and returns a value from this object using jsonPointer, or + returns null if the query fails due to a missing key.
      +
      +
      Parameters:
      +
      jsonPointer - the string representation of the JSON pointer
      +
      Returns:
      +
      the queried value or null
      +
      Throws:
      +
      IllegalArgumentException - if jsonPointer has invalid syntax
      +
      +
      +
    • +
    • +
      +

      optQuery

      +
      public Object optQuery(JSONPointer jsonPointer)
      +
      Queries and returns a value from this object using jsonPointer, or + returns null if the query fails due to a missing key.
      +
      +
      Parameters:
      +
      jsonPointer - The JSON pointer
      +
      Returns:
      +
      the queried value or null
      +
      Throws:
      +
      IllegalArgumentException - if jsonPointer has invalid syntax
      +
      +
      +
    • +
    • +
      +

      quote

      +
      public static String quote(String string)
      +
      Produce a string in double quotes with backslash sequences in all the + right places. A backslash will be inserted within </, producing + <\/, allowing JSON text to be delivered in HTML. In JSON text, a + string cannot contain a control character or an unescaped quote or + backslash.
      +
      +
      Parameters:
      +
      string - A String
      +
      Returns:
      +
      A String correctly formatted for insertion in a JSON text.
      +
      +
      +
    • +
    • +
      +

      quote

      +
      public static Writer quote(String string, + Writer w) + throws IOException
      +
      Quotes a string and appends the result to a given Writer.
      +
      +
      Parameters:
      +
      string - The input string to be quoted.
      +
      w - The Writer to which the quoted string will be appended.
      +
      Returns:
      +
      The same Writer instance after appending the quoted string.
      +
      Throws:
      +
      IOException - If an I/O error occurs while writing to the Writer.
      +
      +
      +
    • +
    • +
      +

      remove

      +
      public Object remove(String key)
      +
      Remove a name and its value, if present.
      +
      +
      Parameters:
      +
      key - The name to be removed.
      +
      Returns:
      +
      The value that was associated with the name, or null if there was + no value.
      +
      +
      +
    • +
    • +
      +

      similar

      +
      public boolean similar(Object other)
      +
      Determine if two JSONObjects are similar. + They must contain the same set of names which must be associated with + similar values.
      +
      +
      Parameters:
      +
      other - The other JSONObject
      +
      Returns:
      +
      true if they are equal
      +
      +
      +
    • +
    • +
      +

      isDecimalNotation

      +
      protected static boolean isDecimalNotation(String val)
      +
      Tests if the value should be tried as a decimal. It makes no test if there are actual digits.
      +
      +
      Parameters:
      +
      val - value to test
      +
      Returns:
      +
      true if the string is "-0" or if it contains '.', 'e', or 'E', false otherwise.
      +
      +
      +
    • +
    • +
      +

      stringToValue

      +
      public static Object stringToValue(String string)
      +
      Try to convert a string into a number, boolean, or null. If the string + can't be converted, return the string.
      +
      +
      Parameters:
      +
      string - A String. can not be null.
      +
      Returns:
      +
      A simple JSON value.
      +
      Throws:
      +
      NullPointerException - Thrown if the string is null.
      +
      +
      +
    • +
    • +
      +

      stringToNumber

      +
      protected static Number stringToNumber(String val) + throws NumberFormatException
      +
      Converts a string to a number using the narrowest possible type. Possible + returns for this function are BigDecimal, Double, BigInteger, Long, and Integer. + When a Double is returned, it should always be a valid Double and not NaN or +-infinity.
      +
      +
      Parameters:
      +
      val - value to convert
      +
      Returns:
      +
      Number representation of the value.
      +
      Throws:
      +
      NumberFormatException - thrown if the value is not a valid number. A public + caller should catch this and wrap it in a JSONException if applicable.
      +
      +
      +
    • +
    • +
      +

      testValidity

      +
      public static void testValidity(Object o) + throws JSONException
      +
      Throw an exception if the object is a NaN or infinite number.
      +
      +
      Parameters:
      +
      o - The object to test.
      +
      Throws:
      +
      JSONException - If o is a non-finite number.
      +
      +
      +
    • +
    • +
      +

      toJSONArray

      +
      public JSONArray toJSONArray(JSONArray names) + throws JSONException
      +
      Produce a JSONArray containing the values of the members of this + JSONObject.
      +
      +
      Parameters:
      +
      names - A JSONArray containing a list of key strings. This determines + the sequence of the values in the result.
      +
      Returns:
      +
      A JSONArray of values.
      +
      Throws:
      +
      JSONException - If any of the values are non-finite numbers.
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      Make a JSON text of this JSONObject. For compactness, no whitespace is + added. If this would not result in a syntactically correct JSON text, + then null will be returned instead. +

      + Warning: This method assumes that the data structure is acyclical. +

      +
      +
      Overrides:
      +
      toString in class Object
      +
      Returns:
      +
      a printable, displayable, portable, transmittable representation + of the object, beginning with { (left + brace) and ending with } (right + brace).
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString(int indentFactor) + throws JSONException
      +
      Make a pretty-printed JSON text of this JSONObject. + +

      If

      indentFactor > 0
      and the JSONObject + has only one key, then the object will be output on a single line: +
      {"key": 1}
      + +

      If an object has 2 or more keys, then it will be output across + multiple lines:

      {
      +  "key1": 1,
      +  "key2": "value 2",
      +  "key3": 3
      + }
      +

      + Warning: This method assumes that the data structure is acyclical. +

      +
      +
      Parameters:
      +
      indentFactor - The number of spaces to add to each level of indentation.
      +
      Returns:
      +
      a printable, displayable, portable, transmittable representation + of the object, beginning with { (left + brace) and ending with } (right + brace).
      +
      Throws:
      +
      JSONException - If the object contains an invalid number.
      +
      +
      +
    • +
    • +
      +

      valueToString

      +
      public static String valueToString(Object value) + throws JSONException
      +
      Make a JSON text of an Object value. If the object has an + value.toJSONString() method, then that method will be used to produce the + JSON text. The method is required to produce a strictly conforming text. + If the object does not contain a toJSONString method (which is the most + common case), then a text will be produced by other means. If the value + is an array or Collection, then a JSONArray will be made from it and its + toJSONString method will be called. If the value is a MAP, then a + JSONObject will be made from it and its toJSONString method will be + called. Otherwise, the value's toString method will be called, and the + result will be quoted. + +

      + Warning: This method assumes that the data structure is acyclical.

      +
      +
      Parameters:
      +
      value - The value to be serialized.
      +
      Returns:
      +
      a printable, displayable, transmittable representation of the + object, beginning with { (left + brace) and ending with } (right + brace).
      +
      Throws:
      +
      JSONException - If the value is or contains an invalid number.
      +
      +
      +
    • +
    • +
      +

      wrap

      +
      public static Object wrap(Object object)
      +
      Wrap an object, if necessary. If the object is null, return the NULL + object. If it is an array or collection, wrap it in a JSONArray. If it is + a map, wrap it in a JSONObject. If it is a standard property (Double, + String, et al) then it is already wrapped. Otherwise, if it comes from + one of the java packages, turn it into a string. And if it doesn't, try + to wrap it in a JSONObject. If the wrapping fails, then null is returned.
      +
      +
      Parameters:
      +
      object - The object to wrap
      +
      Returns:
      +
      The wrapped value
      +
      +
      +
    • +
    • +
      +

      write

      +
      public Writer write(Writer writer) + throws JSONException
      +
      Write the contents of the JSONObject as JSON text to a writer. For + compactness, no whitespace is added. +

      + Warning: This method assumes that the data structure is acyclical. +

      +
      +
      Parameters:
      +
      writer - the writer object
      +
      Returns:
      +
      The writer.
      +
      Throws:
      +
      JSONException - if a called function has an error
      +
      +
      +
    • +
    • +
      +

      write

      +
      public Writer write(Writer writer, + int indentFactor, + int indent) + throws JSONException
      +
      Write the contents of the JSONObject as JSON text to a writer. + +

      If

      indentFactor > 0
      and the JSONObject + has only one key, then the object will be output on a single line: +
      {"key": 1}
      + +

      If an object has 2 or more keys, then it will be output across + multiple lines:

      {
      +  "key1": 1,
      +  "key2": "value 2",
      +  "key3": 3
      + }
      +

      + Warning: This method assumes that the data structure is acyclical. +

      +
      +
      Parameters:
      +
      writer - Writes the serialized JSON
      +
      indentFactor - The number of spaces to add to each level of indentation.
      +
      indent - The indentation of the top level.
      +
      Returns:
      +
      The writer.
      +
      Throws:
      +
      JSONException - if a called function has an error or a write error + occurs
      +
      +
      +
    • +
    • +
      +

      toMap

      +
      public Map<String,Object> toMap()
      +
      Returns a java.util.Map containing all of the entries in this object. + If an entry in the object is a JSONArray or JSONObject it will also + be converted. +

      + Warning: This method assumes that the data structure is acyclical.

      +
      +
      Returns:
      +
      a java.util.Map containing the entries of this object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/JSONParserConfiguration.html b/src/main/java/JSON-Java/org/json/JSONParserConfiguration.html new file mode 100644 index 0000000..ee5e3de --- /dev/null +++ b/src/main/java/JSON-Java/org/json/JSONParserConfiguration.html @@ -0,0 +1,210 @@ + + + + +JSONParserConfiguration + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class JSONParserConfiguration

+
+
java.lang.Object +
org.json.ParserConfiguration +
org.json.JSONParserConfiguration
+
+
+
+
+
public class JSONParserConfiguration +extends ParserConfiguration
+
Configuration object for the JSON parser. The configuration is immutable.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      JSONParserConfiguration

      +
      public JSONParserConfiguration()
      +
      Configuration with the default values.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      clone

      +
      protected JSONParserConfiguration clone()
      +
      Description copied from class: ParserConfiguration
      +
      Provides a new instance of the same configuration.
      +
      +
      Overrides:
      +
      clone in class ParserConfiguration
      +
      +
      +
    • +
    • +
      +

      withMaxNestingDepth

      +
      public JSONParserConfiguration withMaxNestingDepth(int maxNestingDepth)
      +
      Description copied from class: ParserConfiguration
      +
      Defines the maximum nesting depth that the parser will descend before throwing an exception + when parsing the XML into JSONML. The default max nesting depth is 512, which means the parser + will throw a JsonException if the maximum depth is reached. + Using any negative value as a parameter is equivalent to setting no limit to the nesting depth, + which means the parses will go as deep as the maximum call stack size allows.
      +
      +
      Overrides:
      +
      withMaxNestingDepth in class ParserConfiguration
      +
      Parameters:
      +
      maxNestingDepth - the maximum nesting depth allowed to the XML parser
      +
      Returns:
      +
      The existing configuration will not be modified. A new configuration is returned.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/JSONPointer.Builder.html b/src/main/java/JSON-Java/org/json/JSONPointer.Builder.html new file mode 100644 index 0000000..08cd321 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/JSONPointer.Builder.html @@ -0,0 +1,220 @@ + + + + +JSONPointer.Builder + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class JSONPointer.Builder

+
+
java.lang.Object +
org.json.JSONPointer.Builder
+
+
+
+
Enclosing class:
+
JSONPointer
+
+
+
public static class JSONPointer.Builder +extends Object
+
This class allows the user to build a JSONPointer in steps, using + exactly one segment in each step.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Builder

      +
      public Builder()
      +
      Constructs a new Builder object.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      build

      +
      public JSONPointer build()
      +
      Creates a JSONPointer instance using the tokens previously set using the + append(String) method calls.
      +
      +
      Returns:
      +
      a JSONPointer object
      +
      +
      +
    • +
    • +
      +

      append

      +
      public JSONPointer.Builder append(String token)
      +
      Adds an arbitrary token to the list of reference tokens. It can be any non-null value. + + Unlike in the case of JSON string or URI fragment representation of JSON pointers, the + argument of this method MUST NOT be escaped. If you want to query the property called + "a~b" then you should simply pass the "a~b" string as-is, there is no + need to escape it as "a~0b".
      +
      +
      Parameters:
      +
      token - the new token to be appended to the list
      +
      Returns:
      +
      this
      +
      Throws:
      +
      NullPointerException - if token is null
      +
      +
      +
    • +
    • +
      +

      append

      +
      public JSONPointer.Builder append(int arrayIndex)
      +
      Adds an integer to the reference token list. Although not necessarily, mostly this token will + denote an array index.
      +
      +
      Parameters:
      +
      arrayIndex - the array index to be added to the token list
      +
      Returns:
      +
      this
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/JSONPointer.html b/src/main/java/JSON-Java/org/json/JSONPointer.html new file mode 100644 index 0000000..6f4eac0 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/JSONPointer.html @@ -0,0 +1,293 @@ + + + + +JSONPointer + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class JSONPointer

+
+
java.lang.Object +
org.json.JSONPointer
+
+
+
+
public class JSONPointer +extends Object
+
A JSON Pointer is a simple query language defined for JSON documents by + RFC 6901. + + In a nutshell, JSONPointer allows the user to navigate into a JSON document + using strings, and retrieve targeted objects, like a simple form of XPATH. + Path segments are separated by the '/' char, which signifies the root of + the document when it appears as the first char of the string. Array + elements are navigated using ordinals, counting from 0. JSONPointer strings + may be extended to any arbitrary number of segments. If the navigation + is successful, the matched item is returned. A matched item may be a + JSONObject, a JSONArray, or a JSON value. If the JSONPointer string building + fails, an appropriate exception is thrown. If the navigation fails to find + a match, a JSONPointerException is thrown.
+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    Nested Classes
    +
    +
    Modifier and Type
    +
    Class
    +
    Description
    +
    static class 
    + +
    +
    This class allows the user to build a JSONPointer in steps, using + exactly one segment in each step.
    +
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Pre-parses and initializes a new JSONPointer instance.
    +
    +
    JSONPointer(List<String> refTokens)
    +
    +
    Constructs a new JSONPointer instance with the provided list of reference tokens.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Static factory method for JSONPointer.Builder.
    +
    + +
    queryFrom(Object document)
    +
    +
    Evaluates this JSON Pointer on the given document.
    +
    + + +
    +
    Returns a string representing the JSONPointer path value using string + representation
    +
    + + +
    +
    Returns a string representing the JSONPointer path value using URI + fragment identifier representation
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      JSONPointer

      +
      public JSONPointer(String pointer)
      +
      Pre-parses and initializes a new JSONPointer instance. If you want to + evaluate the same JSON Pointer on different JSON documents then it is recommended + to keep the JSONPointer instances due to performance considerations.
      +
      +
      Parameters:
      +
      pointer - the JSON String or URI Fragment representation of the JSON pointer.
      +
      Throws:
      +
      IllegalArgumentException - if pointer is not a valid JSON pointer
      +
      +
      +
    • +
    • +
      +

      JSONPointer

      +
      public JSONPointer(List<String> refTokens)
      +
      Constructs a new JSONPointer instance with the provided list of reference tokens.
      +
      +
      Parameters:
      +
      refTokens - A list of strings representing the reference tokens for the JSON Pointer. + Each token identifies a step in the path to the targeted value.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      builder

      +
      public static JSONPointer.Builder builder()
      +
      Static factory method for JSONPointer.Builder. Example usage: + +
      
      + JSONPointer pointer = JSONPointer.builder()
      +       .append("obj")
      +       .append("other~key").append("another/key")
      +       .append("\"")
      +       .append(0)
      +       .build();
      + 
      +
      +
      Returns:
      +
      a builder instance which can be used to construct a JSONPointer instance by chained + JSONPointer.Builder.append(String) calls.
      +
      +
      +
    • +
    • +
      +

      queryFrom

      +
      public Object queryFrom(Object document) + throws JSONPointerException
      +
      Evaluates this JSON Pointer on the given document. The document + is usually a JSONObject or a JSONArray instance, but the empty + JSON Pointer ("") can be evaluated on any JSON values and in such case the + returned value will be document itself.
      +
      +
      Parameters:
      +
      document - the JSON document which should be the subject of querying.
      +
      Returns:
      +
      the result of the evaluation
      +
      Throws:
      +
      JSONPointerException - if an error occurs during evaluation
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      Returns a string representing the JSONPointer path value using string + representation
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      toURIFragment

      +
      public String toURIFragment()
      +
      Returns a string representing the JSONPointer path value using URI + fragment identifier representation
      +
      +
      Returns:
      +
      a uri fragment string
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/JSONPointerException.html b/src/main/java/JSON-Java/org/json/JSONPointerException.html new file mode 100644 index 0000000..1fd9868 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/JSONPointerException.html @@ -0,0 +1,177 @@ + + + + +JSONPointerException + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class JSONPointerException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class JSONPointerException +extends JSONException
+
The JSONPointerException is thrown by JSONPointer if an error occurs + during evaluating a pointer.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      JSONPointerException

      +
      public JSONPointerException(String message)
      +
      Constructs a new JSONPointerException with the specified error message.
      +
      +
      Parameters:
      +
      message - The detail message describing the reason for the exception.
      +
      +
      +
    • +
    • +
      +

      JSONPointerException

      +
      public JSONPointerException(String message, + Throwable cause)
      +
      Constructs a new JSONPointerException with the specified error message and cause.
      +
      +
      Parameters:
      +
      message - The detail message describing the reason for the exception.
      +
      cause - The cause of the exception.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/JSONPropertyIgnore.html b/src/main/java/JSON-Java/org/json/JSONPropertyIgnore.html new file mode 100644 index 0000000..5a7fab5 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/JSONPropertyIgnore.html @@ -0,0 +1,84 @@ + + + + +JSONPropertyIgnore + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Annotation Interface JSONPropertyIgnore

+
+
+
+
@Documented +@Retention(RUNTIME) +@Target(METHOD) +public @interface JSONPropertyIgnore
+
Use this annotation on a getter method to override the Bean name + parser for Bean -> JSONObject mapping. If this annotation is + present at any level in the class hierarchy, then the method will + not be serialized from the bean into the JSONObject.
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/JSONPropertyName.html b/src/main/java/JSON-Java/org/json/JSONPropertyName.html new file mode 100644 index 0000000..8c135dd --- /dev/null +++ b/src/main/java/JSON-Java/org/json/JSONPropertyName.html @@ -0,0 +1,127 @@ + + + + +JSONPropertyName + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Annotation Interface JSONPropertyName

+
+
+
+
@Documented +@Retention(RUNTIME) +@Target(METHOD) +public @interface JSONPropertyName
+
Use this annotation on a getter method to override the Bean name + parser for Bean -> JSONObject mapping. A value set to empty string "" + will have the Bean parser fall back to the default field name processing.
+
+
+
    + +
  • +
    +

    Required Element Summary

    +
    Required Elements
    +
    +
    Modifier and Type
    +
    Required Element
    +
    Description
    + + +
    +
    The value of the JSON property.
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Element Details

    +
      +
    • +
      +

      value

      +
      String value
      +
      The value of the JSON property.
      +
      +
      Returns:
      +
      The name of the property as to be used in the JSON Object.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/JSONString.html b/src/main/java/JSON-Java/org/json/JSONString.html new file mode 100644 index 0000000..f0841ad --- /dev/null +++ b/src/main/java/JSON-Java/org/json/JSONString.html @@ -0,0 +1,139 @@ + + + + +JSONString + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Interface JSONString

+
+
+
+
public interface JSONString
+
The JSONString interface allows a toJSONString() + method so that a class can change the behavior of + JSONObject.toString(), JSONArray.toString(), + and JSONWriter.value(Object). The + toJSONString method will be used instead of the default behavior + of using the Object's toString() method and quoting the result.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    The toJSONString method allows a class to produce its own JSON + serialization.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toJSONString

      +
      String toJSONString()
      +
      The toJSONString method allows a class to produce its own JSON + serialization.
      +
      +
      Returns:
      +
      A strictly syntactically correct JSON text.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/JSONStringer.html b/src/main/java/JSON-Java/org/json/JSONStringer.html new file mode 100644 index 0000000..cce5151 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/JSONStringer.html @@ -0,0 +1,214 @@ + + + + +JSONStringer + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class JSONStringer

+
+
java.lang.Object +
org.json.JSONWriter +
org.json.JSONStringer
+
+
+
+
+
public class JSONStringer +extends JSONWriter
+
JSONStringer provides a quick and convenient way of producing JSON text. + The texts produced strictly conform to JSON syntax rules. No whitespace is + added, so the results are ready for transmission or storage. Each instance of + JSONStringer can produce one JSON text. +

+ A JSONStringer instance provides a value method for appending + values to the + text, and a key + method for adding keys before values in objects. There are array + and endArray methods that make and bound array values, and + object and endObject methods which make and bound + object values. All of these methods return the JSONWriter instance, + permitting cascade style. For example,

+ myString = new JSONStringer()
+     .object()
+         .key("JSON")
+         .value("Hello, World!")
+     .endObject()
+     .toString();
which produces the string
+ {"JSON":"Hello, World!"}
+

+ The first method called must be array or object. + There are no methods for adding commas or colons. JSONStringer adds them for + you. Objects and arrays can be nested up to 200 levels deep. +

+ This can sometimes be easier than using a JSONObject to build a string.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      JSONStringer

      +
      public JSONStringer()
      +
      Make a fresh JSONStringer. It can be used to build one JSON text.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toString

      +
      public String toString()
      +
      Return the JSON text. This method is used to obtain the product of the + JSONStringer instance. It will return null if there was a + problem in the construction of the JSON text (such as the calls to + array were not properly balanced with calls to + endArray).
      +
      +
      Overrides:
      +
      toString in class Object
      +
      Returns:
      +
      The JSON text.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/JSONTokener.html b/src/main/java/JSON-Java/org/json/JSONTokener.html new file mode 100644 index 0000000..eb11a4d --- /dev/null +++ b/src/main/java/JSON-Java/org/json/JSONTokener.html @@ -0,0 +1,561 @@ + + + + +JSONTokener + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class JSONTokener

+
+
java.lang.Object +
org.json.JSONTokener
+
+
+
+
Direct Known Subclasses:
+
HTTPTokener, XMLTokener
+
+
+
public class JSONTokener +extends Object
+
A JSONTokener takes a source string and extracts characters and tokens from + it. It is used by the JSONObject and JSONArray constructors to parse + JSON source strings.
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    JSONTokener(InputStream inputStream)
    +
    +
    Construct a JSONTokener from an InputStream.
    +
    + +
    +
    Construct a JSONTokener from a Reader.
    +
    + +
    +
    Construct a JSONTokener from a string.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Back up one character.
    +
    +
    void
    + +
    +
    Closes the underlying reader, releasing any resources associated with it.
    +
    +
    static int
    +
    dehexchar(char c)
    +
    +
    Get the hex value of a character (base16).
    +
    +
    boolean
    +
    end()
    +
    +
    Checks if the end of the input has been reached.
    +
    +
    protected char
    + +
    +
    Get the last character read from the input or '\0' if nothing has been read yet.
    +
    +
    boolean
    + +
    +
    Determine if the source string still contains characters that next() + can consume.
    +
    +
    char
    + +
    +
    Get the next character in the source string.
    +
    +
    char
    +
    next(char c)
    +
    +
    Consume the next character, and check that it matches a specified + character.
    +
    + +
    next(int n)
    +
    +
    Get the next n characters.
    +
    +
    char
    + +
    +
    Get the next char in the string, skipping whitespace.
    +
    + +
    nextString(char quote)
    +
    +
    Return the characters up to the next close quote character.
    +
    + +
    nextTo(char delimiter)
    +
    +
    Get the text up but not including the specified character or the + end of line, whichever comes first.
    +
    + +
    nextTo(String delimiters)
    +
    +
    Get the text up but not including one of the specified delimiter + characters or the end of line, whichever comes first.
    +
    + + +
    +
    Get the next value.
    +
    +
    char
    +
    skipTo(char to)
    +
    +
    Skip characters until the next character is the requested character.
    +
    + + +
    +
    Make a JSONException to signal a syntax error.
    +
    + +
    syntaxError(String message, + Throwable causedBy)
    +
    +
    Make a JSONException to signal a syntax error.
    +
    + + +
    +
    Make a printable string of this JSONTokener.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      JSONTokener

      +
      public JSONTokener(Reader reader)
      +
      Construct a JSONTokener from a Reader. The caller must close the Reader.
      +
      +
      Parameters:
      +
      reader - A reader.
      +
      +
      +
    • +
    • +
      +

      JSONTokener

      +
      public JSONTokener(InputStream inputStream)
      +
      Construct a JSONTokener from an InputStream. The caller must close the input stream.
      +
      +
      Parameters:
      +
      inputStream - The source.
      +
      +
      +
    • +
    • +
      +

      JSONTokener

      +
      public JSONTokener(String s)
      +
      Construct a JSONTokener from a string.
      +
      +
      Parameters:
      +
      s - A source string.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      back

      +
      public void back() + throws JSONException
      +
      Back up one character. This provides a sort of lookahead capability, + so that you can test for a digit or letter before attempting to parse + the next number or identifier.
      +
      +
      Throws:
      +
      JSONException - Thrown if trying to step back more than 1 step + or if already at the start of the string
      +
      +
      +
    • +
    • +
      +

      dehexchar

      +
      public static int dehexchar(char c)
      +
      Get the hex value of a character (base16).
      +
      +
      Parameters:
      +
      c - A character between '0' and '9' or between 'A' and 'F' or + between 'a' and 'f'.
      +
      Returns:
      +
      An int between 0 and 15, or -1 if c was not a hex digit.
      +
      +
      +
    • +
    • +
      +

      end

      +
      public boolean end()
      +
      Checks if the end of the input has been reached.
      +
      +
      Returns:
      +
      true if at the end of the file and we didn't step back
      +
      +
      +
    • +
    • +
      +

      more

      +
      public boolean more() + throws JSONException
      +
      Determine if the source string still contains characters that next() + can consume.
      +
      +
      Returns:
      +
      true if not yet at the end of the source.
      +
      Throws:
      +
      JSONException - thrown if there is an error stepping forward + or backward while checking for more data.
      +
      +
      +
    • +
    • +
      +

      next

      +
      public char next() + throws JSONException
      +
      Get the next character in the source string.
      +
      +
      Returns:
      +
      The next character, or 0 if past the end of the source string.
      +
      Throws:
      +
      JSONException - Thrown if there is an error reading the source string.
      +
      +
      +
    • +
    • +
      +

      getPrevious

      +
      protected char getPrevious()
      +
      Get the last character read from the input or '\0' if nothing has been read yet.
      +
      +
      Returns:
      +
      the last character read from the input.
      +
      +
      +
    • +
    • +
      +

      next

      +
      public char next(char c) + throws JSONException
      +
      Consume the next character, and check that it matches a specified + character.
      +
      +
      Parameters:
      +
      c - The character to match.
      +
      Returns:
      +
      The character.
      +
      Throws:
      +
      JSONException - if the character does not match.
      +
      +
      +
    • +
    • +
      +

      next

      +
      public String next(int n) + throws JSONException
      +
      Get the next n characters.
      +
      +
      Parameters:
      +
      n - The number of characters to take.
      +
      Returns:
      +
      A string of n characters.
      +
      Throws:
      +
      JSONException - Substring bounds error if there are not + n characters remaining in the source string.
      +
      +
      +
    • +
    • +
      +

      nextClean

      +
      public char nextClean() + throws JSONException
      +
      Get the next char in the string, skipping whitespace.
      +
      +
      Returns:
      +
      A character, or 0 if there are no more characters.
      +
      Throws:
      +
      JSONException - Thrown if there is an error reading the source string.
      +
      +
      +
    • +
    • +
      +

      nextString

      +
      public String nextString(char quote) + throws JSONException
      +
      Return the characters up to the next close quote character. + Backslash processing is done. The formal JSON format does not + allow strings in single quotes, but an implementation is allowed to + accept them.
      +
      +
      Parameters:
      +
      quote - The quoting character, either + " (double quote) or + ' (single quote).
      +
      Returns:
      +
      A String.
      +
      Throws:
      +
      JSONException - Unterminated string.
      +
      +
      +
    • +
    • +
      +

      nextTo

      +
      public String nextTo(char delimiter) + throws JSONException
      +
      Get the text up but not including the specified character or the + end of line, whichever comes first.
      +
      +
      Parameters:
      +
      delimiter - A delimiter character.
      +
      Returns:
      +
      A string.
      +
      Throws:
      +
      JSONException - Thrown if there is an error while searching + for the delimiter
      +
      +
      +
    • +
    • +
      +

      nextTo

      +
      public String nextTo(String delimiters) + throws JSONException
      +
      Get the text up but not including one of the specified delimiter + characters or the end of line, whichever comes first.
      +
      +
      Parameters:
      +
      delimiters - A set of delimiter characters.
      +
      Returns:
      +
      A string, trimmed.
      +
      Throws:
      +
      JSONException - Thrown if there is an error while searching + for the delimiter
      +
      +
      +
    • +
    • +
      +

      nextValue

      +
      public Object nextValue() + throws JSONException
      +
      Get the next value. The value can be a Boolean, Double, Integer, + JSONArray, JSONObject, Long, or String, or the JSONObject.NULL object.
      +
      +
      Returns:
      +
      An object.
      +
      Throws:
      +
      JSONException - If syntax error.
      +
      +
      +
    • +
    • +
      +

      skipTo

      +
      public char skipTo(char to) + throws JSONException
      +
      Skip characters until the next character is the requested character. + If the requested character is not found, no characters are skipped.
      +
      +
      Parameters:
      +
      to - A character to skip to.
      +
      Returns:
      +
      The requested character, or zero if the requested character + is not found.
      +
      Throws:
      +
      JSONException - Thrown if there is an error while searching + for the to character
      +
      +
      +
    • +
    • +
      +

      syntaxError

      +
      public JSONException syntaxError(String message)
      +
      Make a JSONException to signal a syntax error.
      +
      +
      Parameters:
      +
      message - The error message.
      +
      Returns:
      +
      A JSONException object, suitable for throwing
      +
      +
      +
    • +
    • +
      +

      syntaxError

      +
      public JSONException syntaxError(String message, + Throwable causedBy)
      +
      Make a JSONException to signal a syntax error.
      +
      +
      Parameters:
      +
      message - The error message.
      +
      causedBy - The throwable that caused the error.
      +
      Returns:
      +
      A JSONException object, suitable for throwing
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      Make a printable string of this JSONTokener.
      +
      +
      Overrides:
      +
      toString in class Object
      +
      Returns:
      +
      " at {index} [character {character} line {line}]"
      +
      +
      +
    • +
    • +
      +

      close

      +
      public void close() + throws IOException
      +
      Closes the underlying reader, releasing any resources associated with it.
      +
      +
      Throws:
      +
      IOException - If an I/O error occurs while closing the reader.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/JSONWriter.html b/src/main/java/JSON-Java/org/json/JSONWriter.html new file mode 100644 index 0000000..e3f98f3 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/JSONWriter.html @@ -0,0 +1,466 @@ + + + + +JSONWriter + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class JSONWriter

+
+
java.lang.Object +
org.json.JSONWriter
+
+
+
+
Direct Known Subclasses:
+
JSONStringer
+
+
+
public class JSONWriter +extends Object
+
JSONWriter provides a quick and convenient way of producing JSON text. + The texts produced strictly conform to JSON syntax rules. No whitespace is + added, so the results are ready for transmission or storage. Each instance of + JSONWriter can produce one JSON text. +

+ A JSONWriter instance provides a value method for appending + values to the + text, and a key + method for adding keys before values in objects. There are array + and endArray methods that make and bound array values, and + object and endObject methods which make and bound + object values. All of these methods return the JSONWriter instance, + permitting a cascade style. For example,

+ new JSONWriter(myWriter)
+     .object()
+         .key("JSON")
+         .value("Hello, World!")
+     .endObject();
which writes
+ {"JSON":"Hello, World!"}
+

+ The first method called must be array or object. + There are no methods for adding commas or colons. JSONWriter adds them for + you. Objects and arrays can be nested up to 200 levels deep. +

+ This can sometimes be easier than using a JSONObject to build a string.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      mode

      +
      protected char mode
      +
      The current mode. Values: + 'a' (array), + 'd' (done), + 'i' (initial), + 'k' (key), + 'o' (object).
      +
      +
    • +
    • +
      +

      writer

      +
      protected Appendable writer
      +
      The writer that will receive the output.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      JSONWriter

      +
      public JSONWriter(Appendable w)
      +
      Make a fresh JSONWriter. It can be used to build one JSON text.
      +
      +
      Parameters:
      +
      w - an appendable object
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      array

      +
      public JSONWriter array() + throws JSONException
      +
      Begin appending a new array. All values until the balancing + endArray will be appended to this array. The + endArray method must be called to mark the array's end.
      +
      +
      Returns:
      +
      this
      +
      Throws:
      +
      JSONException - If the nesting is too deep, or if the object is + started in the wrong place (for example as a key or after the end of the + outermost array or object).
      +
      +
      +
    • +
    • +
      +

      endArray

      +
      public JSONWriter endArray() + throws JSONException
      +
      End an array. This method most be called to balance calls to + array.
      +
      +
      Returns:
      +
      this
      +
      Throws:
      +
      JSONException - If incorrectly nested.
      +
      +
      +
    • +
    • +
      +

      endObject

      +
      public JSONWriter endObject() + throws JSONException
      +
      End an object. This method most be called to balance calls to + object.
      +
      +
      Returns:
      +
      this
      +
      Throws:
      +
      JSONException - If incorrectly nested.
      +
      +
      +
    • +
    • +
      +

      key

      +
      public JSONWriter key(String string) + throws JSONException
      +
      Append a key. The key will be associated with the next value. In an + object, every value must be preceded by a key.
      +
      +
      Parameters:
      +
      string - A key string.
      +
      Returns:
      +
      this
      +
      Throws:
      +
      JSONException - If the key is out of place. For example, keys + do not belong in arrays or if the key is null.
      +
      +
      +
    • +
    • +
      +

      object

      +
      public JSONWriter object() + throws JSONException
      +
      Begin appending a new object. All keys and values until the balancing + endObject will be appended to this object. The + endObject method must be called to mark the object's end.
      +
      +
      Returns:
      +
      this
      +
      Throws:
      +
      JSONException - If the nesting is too deep, or if the object is + started in the wrong place (for example as a key or after the end of the + outermost array or object).
      +
      +
      +
    • +
    • +
      +

      valueToString

      +
      public static String valueToString(Object value) + throws JSONException
      +
      Make a JSON text of an Object value. If the object has an + value.toJSONString() method, then that method will be used to produce the + JSON text. The method is required to produce a strictly conforming text. + If the object does not contain a toJSONString method (which is the most + common case), then a text will be produced by other means. If the value + is an array or Collection, then a JSONArray will be made from it and its + toJSONString method will be called. If the value is a MAP, then a + JSONObject will be made from it and its toJSONString method will be + called. Otherwise, the value's toString method will be called, and the + result will be quoted. + +

      + Warning: This method assumes that the data structure is acyclical.

      +
      +
      Parameters:
      +
      value - The value to be serialized.
      +
      Returns:
      +
      a printable, displayable, transmittable representation of the + object, beginning with { (left + brace) and ending with } (right + brace).
      +
      Throws:
      +
      JSONException - If the value is or contains an invalid number.
      +
      +
      +
    • +
    • +
      +

      value

      +
      public JSONWriter value(boolean b) + throws JSONException
      +
      Append either the value true or the value + false.
      +
      +
      Parameters:
      +
      b - A boolean.
      +
      Returns:
      +
      this
      +
      Throws:
      +
      JSONException - if a called function has an error
      +
      +
      +
    • +
    • +
      +

      value

      +
      public JSONWriter value(double d) + throws JSONException
      +
      Append a double value.
      +
      +
      Parameters:
      +
      d - A double.
      +
      Returns:
      +
      this
      +
      Throws:
      +
      JSONException - If the number is not finite.
      +
      +
      +
    • +
    • +
      +

      value

      +
      public JSONWriter value(long l) + throws JSONException
      +
      Append a long value.
      +
      +
      Parameters:
      +
      l - A long.
      +
      Returns:
      +
      this
      +
      Throws:
      +
      JSONException - if a called function has an error
      +
      +
      +
    • +
    • +
      +

      value

      +
      public JSONWriter value(Object object) + throws JSONException
      +
      Append an object value.
      +
      +
      Parameters:
      +
      object - The object to append. It can be null, or a Boolean, Number, + String, JSONObject, or JSONArray, or an object that implements JSONString.
      +
      Returns:
      +
      this
      +
      Throws:
      +
      JSONException - If the value is out of sequence.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/ParserConfiguration.html b/src/main/java/JSON-Java/org/json/ParserConfiguration.html new file mode 100644 index 0000000..6cedfc7 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/ParserConfiguration.html @@ -0,0 +1,363 @@ + + + + +ParserConfiguration + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class ParserConfiguration

+
+
java.lang.Object +
org.json.ParserConfiguration
+
+
+
+
Direct Known Subclasses:
+
JSONMLParserConfiguration, JSONParserConfiguration, XMLParserConfiguration
+
+
+
public class ParserConfiguration +extends Object
+
Configuration base object for parsers. The configuration is immutable.
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static final int
    + +
    +
    The default maximum nesting depth when parsing a document.
    +
    +
    protected boolean
    + +
    +
    Specifies if values should be kept as strings (true), or if + they should try to be guessed into JSON values (numeric, boolean, string)
    +
    +
    protected int
    + +
    +
    The maximum nesting depth when parsing a document.
    +
    +
    static final int
    + +
    +
    Used to indicate there's no defined limit to the maximum nesting depth when parsing a document.
    +
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Modifier
    +
    Constructor
    +
    Description
    +
     
    + +
    +
    Constructs a new ParserConfiguration with default settings.
    +
    +
    protected
    +
    ParserConfiguration(boolean keepStrings, + int maxNestingDepth)
    +
    +
    Constructs a new ParserConfiguration with the specified settings.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Provides a new instance of the same configuration.
    +
    +
    int
    + +
    +
    The maximum nesting depth that the parser will descend before throwing an exception + when parsing the XML into JSONML.
    +
    +
    boolean
    + +
    +
    When parsing the XML into JSONML, specifies if values should be kept as strings (true), or if + they should try to be guessed into JSON values (numeric, boolean, string)
    +
    +
    <T extends ParserConfiguration>
    T
    +
    withKeepStrings(boolean newVal)
    +
    +
    When parsing the XML into JSONML, specifies if values should be kept as strings (true), or if + they should try to be guessed into JSON values (numeric, boolean, string)
    +
    +
    <T extends ParserConfiguration>
    T
    +
    withMaxNestingDepth(int maxNestingDepth)
    +
    +
    Defines the maximum nesting depth that the parser will descend before throwing an exception + when parsing the XML into JSONML.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      UNDEFINED_MAXIMUM_NESTING_DEPTH

      +
      public static final int UNDEFINED_MAXIMUM_NESTING_DEPTH
      +
      Used to indicate there's no defined limit to the maximum nesting depth when parsing a document.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      DEFAULT_MAXIMUM_NESTING_DEPTH

      +
      public static final int DEFAULT_MAXIMUM_NESTING_DEPTH
      +
      The default maximum nesting depth when parsing a document.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      keepStrings

      +
      protected boolean keepStrings
      +
      Specifies if values should be kept as strings (true), or if + they should try to be guessed into JSON values (numeric, boolean, string)
      +
      +
    • +
    • +
      +

      maxNestingDepth

      +
      protected int maxNestingDepth
      +
      The maximum nesting depth when parsing a document.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ParserConfiguration

      +
      public ParserConfiguration()
      +
      Constructs a new ParserConfiguration with default settings.
      +
      +
    • +
    • +
      +

      ParserConfiguration

      +
      protected ParserConfiguration(boolean keepStrings, + int maxNestingDepth)
      +
      Constructs a new ParserConfiguration with the specified settings.
      +
      +
      Parameters:
      +
      keepStrings - A boolean indicating whether to preserve strings during parsing.
      +
      maxNestingDepth - An integer representing the maximum allowed nesting depth.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      clone

      +
      protected ParserConfiguration clone()
      +
      Provides a new instance of the same configuration.
      +
      +
      Overrides:
      +
      clone in class Object
      +
      +
      +
    • +
    • +
      +

      isKeepStrings

      +
      public boolean isKeepStrings()
      +
      When parsing the XML into JSONML, specifies if values should be kept as strings (true), or if + they should try to be guessed into JSON values (numeric, boolean, string)
      +
      +
      Returns:
      +
      The keepStrings configuration value.
      +
      +
      +
    • +
    • +
      +

      withKeepStrings

      +
      public <T extends ParserConfiguration> T withKeepStrings(boolean newVal)
      +
      When parsing the XML into JSONML, specifies if values should be kept as strings (true), or if + they should try to be guessed into JSON values (numeric, boolean, string)
      +
      +
      Type Parameters:
      +
      T - the type of the configuration object
      +
      Parameters:
      +
      newVal - new value to use for the keepStrings configuration option.
      +
      Returns:
      +
      The existing configuration will not be modified. A new configuration is returned.
      +
      +
      +
    • +
    • +
      +

      getMaxNestingDepth

      +
      public int getMaxNestingDepth()
      +
      The maximum nesting depth that the parser will descend before throwing an exception + when parsing the XML into JSONML.
      +
      +
      Returns:
      +
      the maximum nesting depth set for this configuration
      +
      +
      +
    • +
    • +
      +

      withMaxNestingDepth

      +
      public <T extends ParserConfiguration> T withMaxNestingDepth(int maxNestingDepth)
      +
      Defines the maximum nesting depth that the parser will descend before throwing an exception + when parsing the XML into JSONML. The default max nesting depth is 512, which means the parser + will throw a JsonException if the maximum depth is reached. + Using any negative value as a parameter is equivalent to setting no limit to the nesting depth, + which means the parses will go as deep as the maximum call stack size allows.
      +
      +
      Type Parameters:
      +
      T - the type of the configuration object
      +
      Parameters:
      +
      maxNestingDepth - the maximum nesting depth allowed to the XML parser
      +
      Returns:
      +
      The existing configuration will not be modified. A new configuration is returned.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/Property.html b/src/main/java/JSON-Java/org/json/Property.html new file mode 100644 index 0000000..9a9d20d --- /dev/null +++ b/src/main/java/JSON-Java/org/json/Property.html @@ -0,0 +1,195 @@ + + + + +Property + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class Property

+
+
java.lang.Object +
org.json.Property
+
+
+
+
public class Property +extends Object
+
Converts a Property file data into JSONObject and back.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Property

      +
      public Property()
      +
      Constructs a new Property object.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toJSONObject

      +
      public static JSONObject toJSONObject(Properties properties) + throws JSONException
      +
      Converts a property file object into a JSONObject. The property file object is a table of name value pairs.
      +
      +
      Parameters:
      +
      properties - java.util.Properties
      +
      Returns:
      +
      JSONObject
      +
      Throws:
      +
      JSONException - if a called function has an error
      +
      +
      +
    • +
    • +
      +

      toProperties

      +
      public static Properties toProperties(JSONObject jo) + throws JSONException
      +
      Converts the JSONObject into a property file object.
      +
      +
      Parameters:
      +
      jo - JSONObject
      +
      Returns:
      +
      java.util.Properties
      +
      Throws:
      +
      JSONException - if a called function has an error
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/XML.html b/src/main/java/JSON-Java/org/json/XML.html new file mode 100644 index 0000000..513bc29 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/XML.html @@ -0,0 +1,787 @@ + + + + +XML + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class XML

+
+
java.lang.Object +
org.json.XML
+
+
+
+
public class XML +extends Object
+
This provides static methods to convert an XML text into a JSONObject, and to + covert a JSONObject into an XML text.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      AMP

      +
      public static final Character AMP
      +
      The Character '&'.
      +
      +
    • +
    • +
      +

      APOS

      +
      public static final Character APOS
      +
      The Character '''.
      +
      +
    • +
    • +
      +

      BANG

      +
      public static final Character BANG
      +
      The Character '!'.
      +
      +
    • +
    • +
      +

      EQ

      +
      public static final Character EQ
      +
      The Character '='.
      +
      +
    • +
    • +
      +

      GT

      +
      public static final Character GT
      +
      The Character
      '>'. 
      +
      +
    • +
    • +
      +

      LT

      +
      public static final Character LT
      +
      The Character '<'.
      +
      +
    • +
    • +
      +

      QUEST

      +
      public static final Character QUEST
      +
      The Character '?'.
      +
      +
    • +
    • +
      +

      QUOT

      +
      public static final Character QUOT
      +
      The Character '"'.
      +
      +
    • +
    • +
      +

      SLASH

      +
      public static final Character SLASH
      +
      The Character '/'.
      +
      +
    • +
    • +
      +

      NULL_ATTR

      +
      public static final String NULL_ATTR
      +
      Null attribute name
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      TYPE_ATTR

      +
      public static final String TYPE_ATTR
      +
      Represents the XML attribute name for specifying type information.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      XML

      +
      public XML()
      +
      Constructs a new XML object.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      escape

      +
      public static String escape(String string)
      +
      Replace special characters with XML escapes: + +
      
      + &amp; (ampersand) is replaced by &amp;amp;
      + &lt; (less than) is replaced by &amp;lt;
      + &gt; (greater than) is replaced by &amp;gt;
      + &quot; (double quote) is replaced by &amp;quot;
      + &apos; (single quote / apostrophe) is replaced by &amp;apos;
      + 
      +
      +
      Parameters:
      +
      string - The string to be escaped.
      +
      Returns:
      +
      The escaped string.
      +
      +
      +
    • +
    • +
      +

      unescape

      +
      public static String unescape(String string)
      +
      Removes XML escapes from the string.
      +
      +
      Parameters:
      +
      string - string to remove escapes from
      +
      Returns:
      +
      string with converted entities
      +
      +
      +
    • +
    • +
      +

      noSpace

      +
      public static void noSpace(String string) + throws JSONException
      +
      Throw an exception if the string contains whitespace. Whitespace is not + allowed in tagNames and attributes.
      +
      +
      Parameters:
      +
      string - A string.
      +
      Throws:
      +
      JSONException - Thrown if the string contains whitespace or is empty.
      +
      +
      +
    • +
    • +
      +

      stringToValue

      +
      public static Object stringToValue(String string, + XMLXsiTypeConverter<?> typeConverter)
      +
      This method tries to convert the given string value to the target object
      +
      +
      Parameters:
      +
      string - String to convert
      +
      typeConverter - value converter to convert string to integer, boolean e.t.c
      +
      Returns:
      +
      JSON value of this string or the string
      +
      +
      +
    • +
    • +
      +

      stringToValue

      +
      public static Object stringToValue(String string)
      +
      This method is the same as JSONObject.stringToValue(String).
      +
      +
      Parameters:
      +
      string - String to convert
      +
      Returns:
      +
      JSON value of this string or the string
      +
      +
      +
    • +
    • +
      +

      toJSONObject

      +
      public static JSONObject toJSONObject(String string) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject. Some information may be lost in this transformation because + JSON is a data format and XML is a document format. XML uses elements, + attributes, and content text, while JSON uses unordered collections of + name/value pairs and arrays of values. JSON does not does not like to + distinguish between elements and attributes. Sequences of similar + elements are represented as JSONArrays. Content text may be placed in a + "content" member. Comments, prologs, DTDs, and
      
      + &lt;[ [ ]]>
      + are ignored.
      +
      +
      Parameters:
      +
      string - The source string.
      +
      Returns:
      +
      A JSONObject containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown if there is an errors while parsing the string
      +
      +
      +
    • +
    • +
      +

      toJSONObject

      +
      public static JSONObject toJSONObject(Reader reader) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML into a + JSONObject. Some information may be lost in this transformation because + JSON is a data format and XML is a document format. XML uses elements, + attributes, and content text, while JSON uses unordered collections of + name/value pairs and arrays of values. JSON does not does not like to + distinguish between elements and attributes. Sequences of similar + elements are represented as JSONArrays. Content text may be placed in a + "content" member. Comments, prologs, DTDs, and
      
      + &lt;[ [ ]]>
      + are ignored.
      +
      +
      Parameters:
      +
      reader - The XML source reader.
      +
      Returns:
      +
      A JSONObject containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown if there is an errors while parsing the string
      +
      +
      +
    • +
    • +
      +

      toJSONObject

      +
      public static JSONObject toJSONObject(Reader reader, + boolean keepStrings) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML into a + JSONObject. Some information may be lost in this transformation because + JSON is a data format and XML is a document format. XML uses elements, + attributes, and content text, while JSON uses unordered collections of + name/value pairs and arrays of values. JSON does not does not like to + distinguish between elements and attributes. Sequences of similar + elements are represented as JSONArrays. Content text may be placed in a + "content" member. Comments, prologs, DTDs, and
      
      + &lt;[ [ ]]>
      + are ignored. + + All values are converted as strings, for 1, 01, 29.0 will not be coerced to + numbers but will instead be the exact value as seen in the XML document.
      +
      +
      Parameters:
      +
      reader - The XML source reader.
      +
      keepStrings - If true, then values will not be coerced into boolean + or numeric values and will instead be left as strings
      +
      Returns:
      +
      A JSONObject containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown if there is an errors while parsing the string
      +
      +
      +
    • +
    • +
      +

      toJSONObject

      +
      public static JSONObject toJSONObject(Reader reader, + XMLParserConfiguration config) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML into a + JSONObject. Some information may be lost in this transformation because + JSON is a data format and XML is a document format. XML uses elements, + attributes, and content text, while JSON uses unordered collections of + name/value pairs and arrays of values. JSON does not does not like to + distinguish between elements and attributes. Sequences of similar + elements are represented as JSONArrays. Content text may be placed in a + "content" member. Comments, prologs, DTDs, and
      
      + &lt;[ [ ]]>
      + are ignored. + + All values are converted as strings, for 1, 01, 29.0 will not be coerced to + numbers but will instead be the exact value as seen in the XML document.
      +
      +
      Parameters:
      +
      reader - The XML source reader.
      +
      config - Configuration options for the parser
      +
      Returns:
      +
      A JSONObject containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown if there is an errors while parsing the string
      +
      +
      +
    • +
    • +
      +

      toJSONObject

      +
      public static JSONObject toJSONObject(String string, + boolean keepStrings) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject. Some information may be lost in this transformation because + JSON is a data format and XML is a document format. XML uses elements, + attributes, and content text, while JSON uses unordered collections of + name/value pairs and arrays of values. JSON does not does not like to + distinguish between elements and attributes. Sequences of similar + elements are represented as JSONArrays. Content text may be placed in a + "content" member. Comments, prologs, DTDs, and
      
      + &lt;[ [ ]]>
      + are ignored. + + All values are converted as strings, for 1, 01, 29.0 will not be coerced to + numbers but will instead be the exact value as seen in the XML document.
      +
      +
      Parameters:
      +
      string - The source string.
      +
      keepStrings - If true, then values will not be coerced into boolean + or numeric values and will instead be left as strings
      +
      Returns:
      +
      A JSONObject containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown if there is an errors while parsing the string
      +
      +
      +
    • +
    • +
      +

      toJSONObject

      +
      public static JSONObject toJSONObject(String string, + XMLParserConfiguration config) + throws JSONException
      +
      Convert a well-formed (but not necessarily valid) XML string into a + JSONObject. Some information may be lost in this transformation because + JSON is a data format and XML is a document format. XML uses elements, + attributes, and content text, while JSON uses unordered collections of + name/value pairs and arrays of values. JSON does not does not like to + distinguish between elements and attributes. Sequences of similar + elements are represented as JSONArrays. Content text may be placed in a + "content" member. Comments, prologs, DTDs, and
      
      + &lt;[ [ ]]>
      + are ignored. + + All values are converted as strings, for 1, 01, 29.0 will not be coerced to + numbers but will instead be the exact value as seen in the XML document.
      +
      +
      Parameters:
      +
      string - The source string.
      +
      config - Configuration options for the parser.
      +
      Returns:
      +
      A JSONObject containing the structured data from the XML string.
      +
      Throws:
      +
      JSONException - Thrown if there is an errors while parsing the string
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public static String toString(Object object) + throws JSONException
      +
      Convert a JSONObject into a well-formed, element-normal XML string.
      +
      +
      Parameters:
      +
      object - A JSONObject.
      +
      Returns:
      +
      A string.
      +
      Throws:
      +
      JSONException - Thrown if there is an error parsing the string
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public static String toString(Object object, + String tagName)
      +
      Convert a JSONObject into a well-formed, element-normal XML string.
      +
      +
      Parameters:
      +
      object - A JSONObject.
      +
      tagName - The optional name of the enclosing tag.
      +
      Returns:
      +
      A string.
      +
      Throws:
      +
      JSONException - Thrown if there is an error parsing the string
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public static String toString(Object object, + String tagName, + XMLParserConfiguration config) + throws JSONException
      +
      Convert a JSONObject into a well-formed, element-normal XML string.
      +
      +
      Parameters:
      +
      object - A JSONObject.
      +
      tagName - The optional name of the enclosing tag.
      +
      config - Configuration that can control output to XML.
      +
      Returns:
      +
      A string.
      +
      Throws:
      +
      JSONException - Thrown if there is an error parsing the string
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public static String toString(Object object, + int indentFactor)
      +
      Convert a JSONObject into a well-formed, pretty printed element-normal XML string.
      +
      +
      Parameters:
      +
      object - A JSONObject.
      +
      indentFactor - The number of spaces to add to each level of indentation.
      +
      Returns:
      +
      A string.
      +
      Throws:
      +
      JSONException - Thrown if there is an error parsing the string
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public static String toString(Object object, + String tagName, + int indentFactor)
      +
      Convert a JSONObject into a well-formed, pretty printed element-normal XML string.
      +
      +
      Parameters:
      +
      object - A JSONObject.
      +
      tagName - The optional name of the enclosing tag.
      +
      indentFactor - The number of spaces to add to each level of indentation.
      +
      Returns:
      +
      A string.
      +
      Throws:
      +
      JSONException - Thrown if there is an error parsing the string
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public static String toString(Object object, + String tagName, + XMLParserConfiguration config, + int indentFactor) + throws JSONException
      +
      Convert a JSONObject into a well-formed, pretty printed element-normal XML string.
      +
      +
      Parameters:
      +
      object - A JSONObject.
      +
      tagName - The optional name of the enclosing tag.
      +
      config - Configuration that can control output to XML.
      +
      indentFactor - The number of spaces to add to each level of indentation.
      +
      Returns:
      +
      A string.
      +
      Throws:
      +
      JSONException - Thrown if there is an error parsing the string
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/XMLParserConfiguration.html b/src/main/java/JSON-Java/org/json/XMLParserConfiguration.html new file mode 100644 index 0000000..6b1d4b2 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/XMLParserConfiguration.html @@ -0,0 +1,618 @@ + + + + +XMLParserConfiguration + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class XMLParserConfiguration

+
+
java.lang.Object +
org.json.ParserConfiguration +
org.json.XMLParserConfiguration
+
+
+
+
+
public class XMLParserConfiguration +extends ParserConfiguration
+
Configuration object for the XML parser. The configuration is immutable.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      ORIGINAL

      +
      public static final XMLParserConfiguration ORIGINAL
      +
      Original Configuration of the XML Parser.
      +
      +
    • +
    • +
      +

      KEEP_STRINGS

      +
      public static final XMLParserConfiguration KEEP_STRINGS
      +
      Original configuration of the XML Parser except that values are kept as strings.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      XMLParserConfiguration

      +
      public XMLParserConfiguration()
      +
      Default parser configuration. Does not keep strings (tries to implicitly convert + values), and the CDATA Tag Name is "content". Trims whitespace.
      +
      +
    • +
    • +
      +

      XMLParserConfiguration

      +
      @Deprecated +public XMLParserConfiguration(boolean keepStrings)
      +
      Deprecated. +
      This constructor has been deprecated in favor of using the new builder + pattern for the configuration. + This constructor may be removed in a future release.
      +
      +
      Configure the parser string processing and use the default CDATA Tag Name as "content".
      +
      +
      Parameters:
      +
      keepStrings - true to parse all values as string. + false to try and convert XML string values into a JSON value.
      +
      +
      +
    • +
    • +
      +

      XMLParserConfiguration

      +
      @Deprecated +public XMLParserConfiguration(String cDataTagName)
      +
      Deprecated. +
      This constructor has been deprecated in favor of using the new builder + pattern for the configuration. + This constructor may be removed in a future release.
      +
      +
      Configure the parser string processing to try and convert XML values to JSON values and + use the passed CDATA Tag Name the processing value. Pass null to + disable CDATA processing
      +
      +
      Parameters:
      +
      cDataTagName - null to disable CDATA processing. Any other value + to use that value as the JSONObject key name to process as CDATA.
      +
      +
      +
    • +
    • +
      +

      XMLParserConfiguration

      +
      @Deprecated +public XMLParserConfiguration(boolean keepStrings, + String cDataTagName)
      +
      Deprecated. +
      This constructor has been deprecated in favor of using the new builder + pattern for the configuration. + This constructor may be removed in a future release.
      +
      +
      Configure the parser to use custom settings.
      +
      +
      Parameters:
      +
      keepStrings - true to parse all values as string. + false to try and convert XML string values into a JSON value.
      +
      cDataTagName - null to disable CDATA processing. Any other value + to use that value as the JSONObject key name to process as CDATA.
      +
      +
      +
    • +
    • +
      +

      XMLParserConfiguration

      +
      @Deprecated +public XMLParserConfiguration(boolean keepStrings, + String cDataTagName, + boolean convertNilAttributeToNull)
      +
      Deprecated. +
      This constructor has been deprecated in favor of using the new builder + pattern for the configuration. + This constructor may be removed or marked private in a future release.
      +
      +
      Configure the parser to use custom settings.
      +
      +
      Parameters:
      +
      keepStrings - true to parse all values as string. + false to try and convert XML string values into a JSON value.
      +
      cDataTagName - null to disable CDATA processing. Any other value + to use that value as the JSONObject key name to process as CDATA.
      +
      convertNilAttributeToNull - true to parse values with attribute xsi:nil="true" as null. + false to parse values with attribute xsi:nil="true" as {"xsi:nil":true}.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      clone

      +
      protected XMLParserConfiguration clone()
      +
      Provides a new instance of the same configuration.
      +
      +
      Overrides:
      +
      clone in class ParserConfiguration
      +
      +
      +
    • +
    • +
      +

      withKeepStrings

      +
      public XMLParserConfiguration withKeepStrings(boolean newVal)
      +
      When parsing the XML into JSON, specifies if values should be kept as strings (true), or if + they should try to be guessed into JSON values (numeric, boolean, string)
      +
      +
      Overrides:
      +
      withKeepStrings in class ParserConfiguration
      +
      Parameters:
      +
      newVal - new value to use for the keepStrings configuration option.
      +
      Returns:
      +
      The existing configuration will not be modified. A new configuration is returned.
      +
      +
      +
    • +
    • +
      +

      getcDataTagName

      +
      public String getcDataTagName()
      +
      The name of the key in a JSON Object that indicates a CDATA section. Historically this has + been the value "content" but can be changed. Use null to indicate no CDATA + processing.
      +
      +
      Returns:
      +
      The cDataTagName configuration value.
      +
      +
      +
    • +
    • +
      +

      withcDataTagName

      +
      public XMLParserConfiguration withcDataTagName(String newVal)
      +
      The name of the key in a JSON Object that indicates a CDATA section. Historically this has + been the value "content" but can be changed. Use null to indicate no CDATA + processing.
      +
      +
      Parameters:
      +
      newVal - new value to use for the cDataTagName configuration option.
      +
      Returns:
      +
      The existing configuration will not be modified. A new configuration is returned.
      +
      +
      +
    • +
    • +
      +

      isConvertNilAttributeToNull

      +
      public boolean isConvertNilAttributeToNull()
      +
      When parsing the XML into JSON, specifies if values with attribute xsi:nil="true" + should be kept as attribute(false), or they should be converted to + null(true)
      +
      +
      Returns:
      +
      The convertNilAttributeToNull configuration value.
      +
      +
      +
    • +
    • +
      +

      withConvertNilAttributeToNull

      +
      public XMLParserConfiguration withConvertNilAttributeToNull(boolean newVal)
      +
      When parsing the XML into JSON, specifies if values with attribute xsi:nil="true" + should be kept as attribute(false), or they should be converted to + null(true)
      +
      +
      Parameters:
      +
      newVal - new value to use for the convertNilAttributeToNull configuration option.
      +
      Returns:
      +
      The existing configuration will not be modified. A new configuration is returned.
      +
      +
      +
    • +
    • +
      +

      getXsiTypeMap

      +
      public Map<String,XMLXsiTypeConverter<?>> getXsiTypeMap()
      +
      When parsing the XML into JSON, specifies that the values with attribute xsi:type + will be converted to target type defined to client in this configuration + Map<String, XMLXsiTypeConverter<?>> to parse values with attribute + xsi:type="integer" as integer, xsi:type="string" as string
      +
      +
      Returns:
      +
      xsiTypeMap unmodifiable configuration map.
      +
      +
      +
    • +
    • +
      +

      withXsiTypeMap

      +
      public XMLParserConfiguration withXsiTypeMap(Map<String,XMLXsiTypeConverter<?>> xsiTypeMap)
      +
      When parsing the XML into JSON, specifies that the values with attribute xsi:type + will be converted to target type defined to client in this configuration + Map<String, XMLXsiTypeConverter<?>> to parse values with attribute + xsi:type="integer" as integer, xsi:type="string" as string
      +
      +
      Parameters:
      +
      xsiTypeMap - new HashMap<String, XMLXsiTypeConverter<?>>() to parse values with attribute + xsi:type="integer" as integer, xsi:type="string" as string
      +
      Returns:
      +
      The existing configuration will not be modified. A new configuration is returned.
      +
      +
      +
    • +
    • +
      +

      getForceList

      +
      public Set<String> getForceList()
      +
      When parsing the XML into JSON, specifies that tags that will be converted to arrays + in this configuration Set<String> to parse the provided tags' values as arrays
      +
      +
      Returns:
      +
      forceList unmodifiable configuration set.
      +
      +
      +
    • +
    • +
      +

      withForceList

      +
      public XMLParserConfiguration withForceList(Set<String> forceList)
      +
      When parsing the XML into JSON, specifies that tags that will be converted to arrays + in this configuration Set<String> to parse the provided tags' values as arrays
      +
      +
      Parameters:
      +
      forceList - new HashSet<String>() to parse the provided tags' values as arrays
      +
      Returns:
      +
      The existing configuration will not be modified. A new configuration is returned.
      +
      +
      +
    • +
    • +
      +

      withMaxNestingDepth

      +
      public XMLParserConfiguration withMaxNestingDepth(int maxNestingDepth)
      +
      Defines the maximum nesting depth that the parser will descend before throwing an exception + when parsing the XML into JSON. The default max nesting depth is 512, which means the parser + will throw a JsonException if the maximum depth is reached. + Using any negative value as a parameter is equivalent to setting no limit to the nesting depth, + which means the parses will go as deep as the maximum call stack size allows.
      +
      +
      Overrides:
      +
      withMaxNestingDepth in class ParserConfiguration
      +
      Parameters:
      +
      maxNestingDepth - the maximum nesting depth allowed to the XML parser
      +
      Returns:
      +
      The existing configuration will not be modified. A new configuration is returned.
      +
      +
      +
    • +
    • +
      +

      withCloseEmptyTag

      +
      public XMLParserConfiguration withCloseEmptyTag(boolean closeEmptyTag)
      +
      To enable explicit end tag with empty value.
      +
      +
      Parameters:
      +
      closeEmptyTag - new value for the closeEmptyTag property
      +
      Returns:
      +
      same instance of configuration with empty tag config updated
      +
      +
      +
    • +
    • +
      +

      withShouldTrimWhitespace

      +
      public XMLParserConfiguration withShouldTrimWhitespace(boolean shouldTrimWhiteSpace)
      +
      Sets whether whitespace should be trimmed inside of tags. *NOTE* Do not use this if + you expect your XML tags to have names that are the same as cDataTagName as this is unsupported. + cDataTagName should be set to a distinct value in these cases.
      +
      +
      Parameters:
      +
      shouldTrimWhiteSpace - boolean to set trimming on or off. Off is default.
      +
      Returns:
      +
      same instance of configuration with empty tag config updated
      +
      +
      +
    • +
    • +
      +

      isCloseEmptyTag

      +
      public boolean isCloseEmptyTag()
      +
      Checks if the parser should automatically close empty XML tags.
      +
      +
      Returns:
      +
      true if empty XML tags should be automatically closed, false otherwise.
      +
      +
      +
    • +
    • +
      +

      shouldTrimWhiteSpace

      +
      public boolean shouldTrimWhiteSpace()
      +
      Checks if the parser should trim white spaces from XML content.
      +
      +
      Returns:
      +
      true if white spaces should be trimmed, false otherwise.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/XMLTokener.html b/src/main/java/JSON-Java/org/json/XMLTokener.html new file mode 100644 index 0000000..6378c48 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/XMLTokener.html @@ -0,0 +1,373 @@ + + + + +XMLTokener + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Class XMLTokener

+
+
java.lang.Object +
org.json.JSONTokener +
org.json.XMLTokener
+
+
+
+
+
public class XMLTokener +extends JSONTokener
+
The XMLTokener extends the JSONTokener to provide additional methods + for the parsing of XML texts.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      entity

      +
      public static final HashMap<String,Character> entity
      +
      The table of entity values. It initially contains Character values for + amp, apos, gt, lt, quot.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      XMLTokener

      +
      public XMLTokener(Reader r)
      +
      Construct an XMLTokener from a Reader.
      +
      +
      Parameters:
      +
      r - A source reader.
      +
      +
      +
    • +
    • +
      +

      XMLTokener

      +
      public XMLTokener(String s)
      +
      Construct an XMLTokener from a string.
      +
      +
      Parameters:
      +
      s - A source string.
      +
      +
      +
    • +
    • +
      +

      XMLTokener

      +
      public XMLTokener(Reader r, + XMLParserConfiguration configuration)
      +
      Construct an XMLTokener from a Reader and an XMLParserConfiguration.
      +
      +
      Parameters:
      +
      r - A source reader.
      +
      configuration - the configuration that can be used to set certain flags
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      nextCDATA

      +
      public String nextCDATA() + throws JSONException
      +
      Get the text in the CDATA block.
      +
      +
      Returns:
      +
      The string up to the ]]>.
      +
      Throws:
      +
      JSONException - If the ]]> is not found.
      +
      +
      +
    • +
    • +
      +

      nextContent

      +
      public Object nextContent() + throws JSONException
      +
      Get the next XML outer token, trimming whitespace. There are two kinds + of tokens: the
      '<' 
      character which begins a markup + tag, and the content + text between markup tags.
      +
      +
      Returns:
      +
      A string, or a
      '<' 
      Character, or null if + there is no more source text.
      +
      Throws:
      +
      JSONException - if a called function has an error
      +
      +
      +
    • +
    • +
      +

      nextEntity

      +
      public Object nextEntity(char ampersand) + throws JSONException
      +
      
      + Return the next entity. These entities are translated to Characters:
      +     &amp;  &apos;  &gt;  &lt;  &quot;.
      + 
      +
      +
      Parameters:
      +
      ampersand - An ampersand character.
      +
      Returns:
      +
      A Character or an entity String if the entity is not recognized.
      +
      Throws:
      +
      JSONException - If missing ';' in XML entity.
      +
      +
      +
    • +
    • +
      +

      nextMeta

      +
      public Object nextMeta() + throws JSONException
      +
      
      + Returns the next XML meta token. This is used for skipping over <!...>
      + and <?...?> structures.
      +  
      +
      +
      Returns:
      +
      Syntax characters (< > / = ! ?) are returned as
      +  Character, and strings and names are returned as Boolean. We don't care
      +  what the values actually are.
      +  
      +
      Throws:
      +
      JSONException - If a string is not properly closed or if the XML + is badly structured.
      +
      +
      +
    • +
    • +
      +

      nextToken

      +
      public Object nextToken() + throws JSONException
      +
      
      + Get the next XML Token. These tokens are found inside of angle
      + brackets. It may be one of these characters: / > = ! ? or it
      + may be a string wrapped in single quotes or double quotes, or it may be a
      + name.
      + 
      +
      +
      Returns:
      +
      a String or a Character.
      +
      Throws:
      +
      JSONException - If the XML is not well formed.
      +
      +
      +
    • +
    • +
      +

      skipPast

      +
      public void skipPast(String to)
      +
      Skip characters until past the requested string. + If it is not found, we are left at the end of the source with a result of false.
      +
      +
      Parameters:
      +
      to - A string to skip past.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/XMLXsiTypeConverter.html b/src/main/java/JSON-Java/org/json/XMLXsiTypeConverter.html new file mode 100644 index 0000000..d06854c --- /dev/null +++ b/src/main/java/JSON-Java/org/json/XMLXsiTypeConverter.html @@ -0,0 +1,171 @@ + + + + +XMLXsiTypeConverter + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.json
+

Interface XMLXsiTypeConverter<T>

+
+
+
+
Type Parameters:
+
T - return type of convert method
+
+
+
public interface XMLXsiTypeConverter<T>
+
Type conversion configuration interface to be used with xsi:type attributes. +
+ XML Sample
+ 
+      <root>
+          <asString xsi:type="string">12345</asString>
+          <asInt xsi:type="integer">54321</asInt>
+      </root>
+ 
+ JSON Output
+ 
+     {
+         "root" : {
+             "asString" : "12345",
+             "asInt": 54321
+         }
+     }
+ 
+
+ Usage
+ 
+      Map<String, XMLXsiTypeConverter<?>> xsiTypeMap = new HashMap<String, XMLXsiTypeConverter<?>>();
+      xsiTypeMap.put("string", new XMLXsiTypeConverter<String>() {
+          &#64;Override public String convert(final String value) {
+              return value;
+          }
+      });
+      xsiTypeMap.put("integer", new XMLXsiTypeConverter<Integer>() {
+          &#64;Override public Integer convert(final String value) {
+              return Integer.valueOf(value);
+          }
+      });
+ 
+ 
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + +
    convert(String value)
    +
    +
    Converts an XML xsi:type attribute value to the specified type T.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      convert

      +
      T convert(String value)
      +
      Converts an XML xsi:type attribute value to the specified type T.
      +
      +
      Parameters:
      +
      value - The string representation of the XML xsi:type attribute value to be converted.
      +
      Returns:
      +
      An object of type T representing the converted value.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/package-summary.html b/src/main/java/JSON-Java/org/json/package-summary.html new file mode 100644 index 0000000..0f6f2b1 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/package-summary.html @@ -0,0 +1,205 @@ + + + + +org.json + + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.json

+
+
+
package org.json
+
+
    +
  • +
    +
    +
    +
    +
    Class
    +
    Description
    + +
    +
    This provides static methods to convert comma (or otherwise) delimited text into a + JSONArray, and to convert a JSONArray into comma (or otherwise) delimited text.
    +
    + +
    +
    Convert a web browser cookie specification to a JSONObject and back.
    +
    + +
    +
    Convert a web browser cookie list string to a JSONObject and back.
    +
    + +
    +
    Convert an HTTP header to a JSONObject and back.
    +
    + +
    +
    The HTTPTokener extends the JSONTokener to provide additional methods + for the parsing of HTTP headers.
    +
    + +
    +
    A JSONArray is an ordered sequence of values.
    +
    + +
    +
    The JSONException is thrown by the JSON.org classes when things are amiss.
    +
    + +
    +
    This provides static methods to convert an XML text into a JSONArray or + JSONObject, and to covert a JSONArray or JSONObject into an XML text using + the JsonML transform.
    +
    + +
    +
    Configuration object for the XML to JSONML parser.
    +
    + +
    +
    A JSONObject is an unordered collection of name/value pairs.
    +
    + +
    +
    Configuration object for the JSON parser.
    +
    + +
    +
    A JSON Pointer is a simple query language defined for JSON documents by + RFC 6901.
    +
    + +
    +
    This class allows the user to build a JSONPointer in steps, using + exactly one segment in each step.
    +
    + +
    +
    The JSONPointerException is thrown by JSONPointer if an error occurs + during evaluating a pointer.
    +
    + +
    +
    Use this annotation on a getter method to override the Bean name + parser for Bean -> JSONObject mapping.
    +
    + +
    +
    Use this annotation on a getter method to override the Bean name + parser for Bean -> JSONObject mapping.
    +
    + +
    +
    The JSONString interface allows a toJSONString() + method so that a class can change the behavior of + JSONObject.toString(), JSONArray.toString(), + and JSONWriter.value(Object).
    +
    + +
    +
    JSONStringer provides a quick and convenient way of producing JSON text.
    +
    + +
    +
    A JSONTokener takes a source string and extracts characters and tokens from + it.
    +
    + +
    +
    JSONWriter provides a quick and convenient way of producing JSON text.
    +
    + +
    +
    Configuration base object for parsers.
    +
    + +
    +
    Converts a Property file data into JSONObject and back.
    +
    + +
    +
    This provides static methods to convert an XML text into a JSONObject, and to + covert a JSONObject into an XML text.
    +
    + +
    +
    Configuration object for the XML parser.
    +
    + +
    +
    The XMLTokener extends the JSONTokener to provide additional methods + for the parsing of XML texts.
    +
    + +
    +
    Type conversion configuration interface to be used with xsi:type attributes.
    +
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/src/main/java/JSON-Java/org/json/package-tree.html b/src/main/java/JSON-Java/org/json/package-tree.html new file mode 100644 index 0000000..cff9bc7 --- /dev/null +++ b/src/main/java/JSON-Java/org/json/package-tree.html @@ -0,0 +1,126 @@ + + + + +org.json Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.json

+
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Annotation Interface Hierarchy

+ +
+
+
+
+ + diff --git a/src/main/java/JSON-Java/overview-tree.html b/src/main/java/JSON-Java/overview-tree.html new file mode 100644 index 0000000..e3d7781 --- /dev/null +++ b/src/main/java/JSON-Java/overview-tree.html @@ -0,0 +1,130 @@ + + + + +Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Annotation Interface Hierarchy

+ +
+
+
+
+ + diff --git a/src/main/java/JSON-Java/package-search-index.js b/src/main/java/JSON-Java/package-search-index.js new file mode 100644 index 0000000..65149f3 --- /dev/null +++ b/src/main/java/JSON-Java/package-search-index.js @@ -0,0 +1 @@ +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"org.json"}];updateSearchResults(); \ No newline at end of file diff --git a/src/main/java/JSON-Java/resources/glass.png b/src/main/java/JSON-Java/resources/glass.png new file mode 100644 index 0000000..a7f591f Binary files /dev/null and b/src/main/java/JSON-Java/resources/glass.png differ diff --git a/src/main/java/JSON-Java/resources/x.png b/src/main/java/JSON-Java/resources/x.png new file mode 100644 index 0000000..30548a7 Binary files /dev/null and b/src/main/java/JSON-Java/resources/x.png differ diff --git a/src/main/java/JSON-Java/script-dir/jquery-3.6.1.min.js b/src/main/java/JSON-Java/script-dir/jquery-3.6.1.min.js new file mode 100644 index 0000000..2c69bc9 --- /dev/null +++ b/src/main/java/JSON-Java/script-dir/jquery-3.6.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=x.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthC(E(s),E(n))?o.important="horizontal":o.important="vertical",c.using.call(this,t,o)}),l.offset(x.extend(u,{using:t}))})},x.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,l=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=x(t.target),i=x(x.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){x.contains(this.element[0],x.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=x(t.target).closest(".ui-menu-item"),i=x(t.currentTarget),e[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=x(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case x.ui.keyCode.PAGE_UP:this.previousPage(t);break;case x.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case x.ui.keyCode.HOME:this._move("first","first",t);break;case x.ui.keyCode.END:this._move("last","last",t);break;case x.ui.keyCode.UP:this.previous(t);break;case x.ui.keyCode.DOWN:this.next(t);break;case x.ui.keyCode.LEFT:this.collapse(t);break;case x.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case x.ui.keyCode.ENTER:case x.ui.keyCode.SPACE:this._activate(t);break;case x.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=x(this),e=t.prev(),i=x("").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=x(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(e=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(e,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!x.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(i=parseFloat(x.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(x.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&this._isContentEditable(this.element),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=x("
    ").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){x(t.target).trigger(t.originalEvent)});s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(x("
    ").text(i))},100))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==x.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=x("
    ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||x.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?x(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(x.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=x.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(x("
    ").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),x.extend(x.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(x.ui.autocomplete.escapeRegex(e),"i");return x.grep(t,function(t){return i.test(t.label||t.value||t)})}}),x.widget("ui.autocomplete",x.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1").text(e))},100))}});x.ui.autocomplete}); \ No newline at end of file diff --git a/src/main/java/JSON-Java/script.js b/src/main/java/JSON-Java/script.js new file mode 100644 index 0000000..0765364 --- /dev/null +++ b/src/main/java/JSON-Java/script.js @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +var moduleSearchIndex; +var packageSearchIndex; +var typeSearchIndex; +var memberSearchIndex; +var tagSearchIndex; +function loadScripts(doc, tag) { + createElem(doc, tag, 'search.js'); + + createElem(doc, tag, 'module-search-index.js'); + createElem(doc, tag, 'package-search-index.js'); + createElem(doc, tag, 'type-search-index.js'); + createElem(doc, tag, 'member-search-index.js'); + createElem(doc, tag, 'tag-search-index.js'); +} + +function createElem(doc, tag, path) { + var script = doc.createElement(tag); + var scriptElement = doc.getElementsByTagName(tag)[0]; + script.src = pathtoroot + path; + scriptElement.parentNode.insertBefore(script, scriptElement); +} + +function show(tableId, selected, columns) { + if (tableId !== selected) { + document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')') + .forEach(function(elem) { + elem.style.display = 'none'; + }); + } + document.querySelectorAll('div.' + selected) + .forEach(function(elem, index) { + elem.style.display = ''; + var isEvenRow = index % (columns * 2) < columns; + elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor); + elem.classList.add(isEvenRow ? evenRowColor : oddRowColor); + }); + updateTabs(tableId, selected); +} + +function updateTabs(tableId, selected) { + document.querySelector('div#' + tableId +' .summary-table') + .setAttribute('aria-labelledby', selected); + document.querySelectorAll('button[id^="' + tableId + '"]') + .forEach(function(tab, index) { + if (selected === tab.id || (tableId === selected && index === 0)) { + tab.className = activeTableTab; + tab.setAttribute('aria-selected', true); + tab.setAttribute('tabindex',0); + } else { + tab.className = tableTab; + tab.setAttribute('aria-selected', false); + tab.setAttribute('tabindex',-1); + } + }); +} + +function switchTab(e) { + var selected = document.querySelector('[aria-selected=true]'); + if (selected) { + if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) { + // left or up arrow key pressed: move focus to previous tab + selected.previousSibling.click(); + selected.previousSibling.focus(); + e.preventDefault(); + } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) { + // right or down arrow key pressed: move focus to next tab + selected.nextSibling.click(); + selected.nextSibling.focus(); + e.preventDefault(); + } + } +} + +var updateSearchResults = function() {}; + +function indexFilesLoaded() { + return moduleSearchIndex + && packageSearchIndex + && typeSearchIndex + && memberSearchIndex + && tagSearchIndex; +} + +// Workaround for scroll position not being included in browser history (8249133) +document.addEventListener("DOMContentLoaded", function(e) { + var contentDiv = document.querySelector("div.flex-content"); + window.addEventListener("popstate", function(e) { + if (e.state !== null) { + contentDiv.scrollTop = e.state; + } + }); + window.addEventListener("hashchange", function(e) { + history.replaceState(contentDiv.scrollTop, document.title); + }); + contentDiv.addEventListener("scroll", function(e) { + var timeoutID; + if (!timeoutID) { + timeoutID = setTimeout(function() { + history.replaceState(contentDiv.scrollTop, document.title); + timeoutID = null; + }, 100); + } + }); + if (!location.hash) { + history.replaceState(contentDiv.scrollTop, document.title); + } +}); diff --git a/src/main/java/JSON-Java/search.js b/src/main/java/JSON-Java/search.js new file mode 100644 index 0000000..13aba85 --- /dev/null +++ b/src/main/java/JSON-Java/search.js @@ -0,0 +1,354 @@ +/* + * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +var noResult = {l: "No results found"}; +var loading = {l: "Loading search index..."}; +var catModules = "Modules"; +var catPackages = "Packages"; +var catTypes = "Classes and Interfaces"; +var catMembers = "Members"; +var catSearchTags = "Search Tags"; +var highlight = "$&"; +var searchPattern = ""; +var fallbackPattern = ""; +var RANKING_THRESHOLD = 2; +var NO_MATCH = 0xffff; +var MIN_RESULTS = 3; +var MAX_RESULTS = 500; +var UNNAMED = ""; +function escapeHtml(str) { + return str.replace(//g, ">"); +} +function getHighlightedText(item, matcher, fallbackMatcher) { + var escapedItem = escapeHtml(item); + var highlighted = escapedItem.replace(matcher, highlight); + if (highlighted === escapedItem) { + highlighted = escapedItem.replace(fallbackMatcher, highlight) + } + return highlighted; +} +function getURLPrefix(ui) { + var urlPrefix=""; + var slash = "/"; + if (ui.item.category === catModules) { + return ui.item.l + slash; + } else if (ui.item.category === catPackages && ui.item.m) { + return ui.item.m + slash; + } else if (ui.item.category === catTypes || ui.item.category === catMembers) { + if (ui.item.m) { + urlPrefix = ui.item.m + slash; + } else { + $.each(packageSearchIndex, function(index, item) { + if (item.m && ui.item.p === item.l) { + urlPrefix = item.m + slash; + } + }); + } + } + return urlPrefix; +} +function createSearchPattern(term) { + var pattern = ""; + var isWordToken = false; + term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) { + if (index > 0) { + // whitespace between identifiers is significant + pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*"; + } + var tokens = w.split(/(?=[A-Z,.()<>[\/])/); + for (var i = 0; i < tokens.length; i++) { + var s = tokens[i]; + if (s === "") { + continue; + } + pattern += $.ui.autocomplete.escapeRegex(s); + isWordToken = /\w$/.test(s); + if (isWordToken) { + pattern += "([a-z0-9_$<>\\[\\]]*?)"; + } + } + }); + return pattern; +} +function createMatcher(pattern, flags) { + var isCamelCase = /[A-Z]/.test(pattern); + return new RegExp(pattern, flags + (isCamelCase ? "" : "i")); +} +var watermark = 'Search'; +$(function() { + var search = $("#search-input"); + var reset = $("#reset-button"); + search.val(''); + search.prop("disabled", false); + reset.prop("disabled", false); + search.val(watermark).addClass('watermark'); + search.blur(function() { + if ($(this).val().length === 0) { + $(this).val(watermark).addClass('watermark'); + } + }); + search.on('click keydown paste', function() { + if ($(this).val() === watermark) { + $(this).val('').removeClass('watermark'); + } + }); + reset.click(function() { + search.val('').focus(); + }); + search.focus()[0].setSelectionRange(0, 0); +}); +$.widget("custom.catcomplete", $.ui.autocomplete, { + _create: function() { + this._super(); + this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); + }, + _renderMenu: function(ul, items) { + var rMenu = this; + var currentCategory = ""; + rMenu.menu.bindings = $(); + $.each(items, function(index, item) { + var li; + if (item.category && item.category !== currentCategory) { + ul.append("
  • " + item.category + "
  • "); + currentCategory = item.category; + } + li = rMenu._renderItemData(ul, item); + if (item.category) { + li.attr("aria-label", item.category + " : " + item.l); + li.attr("class", "result-item"); + } else { + li.attr("aria-label", item.l); + li.attr("class", "result-item"); + } + }); + }, + _renderItem: function(ul, item) { + var label = ""; + var matcher = createMatcher(escapeHtml(searchPattern), "g"); + var fallbackMatcher = new RegExp(fallbackPattern, "gi") + if (item.category === catModules) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catPackages) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catTypes) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catMembers) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.c + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.c + "." + item.l, matcher, fallbackMatcher); + } else if (item.category === catSearchTags) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else { + label = item.l; + } + var li = $("
  • ").appendTo(ul); + var div = $("
    ").appendTo(li); + if (item.category === catSearchTags && item.h) { + if (item.d) { + div.html(label + " (" + item.h + ")
    " + + item.d + "
    "); + } else { + div.html(label + " (" + item.h + ")"); + } + } else { + if (item.m) { + div.html(item.m + "/" + label); + } else { + div.html(label); + } + } + return li; + } +}); +function rankMatch(match, category) { + if (!match) { + return NO_MATCH; + } + var index = match.index; + var input = match.input; + var leftBoundaryMatch = 2; + var periferalMatch = 0; + // make sure match is anchored on a left word boundary + if (index === 0 || /\W/.test(input[index - 1]) || "_" === input[index]) { + leftBoundaryMatch = 0; + } else if ("_" === input[index - 1] || (input[index] === input[index].toUpperCase() && !/^[A-Z0-9_$]+$/.test(input))) { + leftBoundaryMatch = 1; + } + var matchEnd = index + match[0].length; + var leftParen = input.indexOf("("); + var endOfName = leftParen > -1 ? leftParen : input.length; + // exclude peripheral matches + if (category !== catModules && category !== catSearchTags) { + var delim = category === catPackages ? "/" : "."; + if (leftParen > -1 && leftParen < index) { + periferalMatch += 2; + } else if (input.lastIndexOf(delim, endOfName) >= matchEnd) { + periferalMatch += 2; + } + } + var delta = match[0].length === endOfName ? 0 : 1; // rank full match higher than partial match + for (var i = 1; i < match.length; i++) { + // lower ranking if parts of the name are missing + if (match[i]) + delta += match[i].length; + } + if (category === catTypes) { + // lower ranking if a type name contains unmatched camel-case parts + if (/[A-Z]/.test(input.substring(matchEnd))) + delta += 5; + if (/[A-Z]/.test(input.substring(0, index))) + delta += 5; + } + return leftBoundaryMatch + periferalMatch + (delta / 200); + +} +function doSearch(request, response) { + var result = []; + searchPattern = createSearchPattern(request.term); + fallbackPattern = createSearchPattern(request.term.toLowerCase()); + if (searchPattern === "") { + return this.close(); + } + var camelCaseMatcher = createMatcher(searchPattern, ""); + var fallbackMatcher = new RegExp(fallbackPattern, "i"); + + function searchIndexWithMatcher(indexArray, matcher, category, nameFunc) { + if (indexArray) { + var newResults = []; + $.each(indexArray, function (i, item) { + item.category = category; + var ranking = rankMatch(matcher.exec(nameFunc(item)), category); + if (ranking < RANKING_THRESHOLD) { + newResults.push({ranking: ranking, item: item}); + } + return newResults.length <= MAX_RESULTS; + }); + return newResults.sort(function(e1, e2) { + return e1.ranking - e2.ranking; + }).map(function(e) { + return e.item; + }); + } + return []; + } + function searchIndex(indexArray, category, nameFunc) { + var primaryResults = searchIndexWithMatcher(indexArray, camelCaseMatcher, category, nameFunc); + result = result.concat(primaryResults); + if (primaryResults.length <= MIN_RESULTS && !camelCaseMatcher.ignoreCase) { + var secondaryResults = searchIndexWithMatcher(indexArray, fallbackMatcher, category, nameFunc); + result = result.concat(secondaryResults.filter(function (item) { + return primaryResults.indexOf(item) === -1; + })); + } + } + + searchIndex(moduleSearchIndex, catModules, function(item) { return item.l; }); + searchIndex(packageSearchIndex, catPackages, function(item) { + return (item.m && request.term.indexOf("/") > -1) + ? (item.m + "/" + item.l) : item.l; + }); + searchIndex(typeSearchIndex, catTypes, function(item) { + return request.term.indexOf(".") > -1 ? item.p + "." + item.l : item.l; + }); + searchIndex(memberSearchIndex, catMembers, function(item) { + return request.term.indexOf(".") > -1 + ? item.p + "." + item.c + "." + item.l : item.l; + }); + searchIndex(tagSearchIndex, catSearchTags, function(item) { return item.l; }); + + if (!indexFilesLoaded()) { + updateSearchResults = function() { + doSearch(request, response); + } + result.unshift(loading); + } else { + updateSearchResults = function() {}; + } + response(result); +} +$(function() { + $("#search-input").catcomplete({ + minLength: 1, + delay: 300, + source: doSearch, + response: function(event, ui) { + if (!ui.content.length) { + ui.content.push(noResult); + } else { + $("#search-input").empty(); + } + }, + autoFocus: true, + focus: function(event, ui) { + return false; + }, + position: { + collision: "flip" + }, + select: function(event, ui) { + if (ui.item.category) { + var url = getURLPrefix(ui); + if (ui.item.category === catModules) { + url += "module-summary.html"; + } else if (ui.item.category === catPackages) { + if (ui.item.u) { + url = ui.item.u; + } else { + url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; + } + } else if (ui.item.category === catTypes) { + if (ui.item.u) { + url = ui.item.u; + } else if (ui.item.p === UNNAMED) { + url += ui.item.l + ".html"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html"; + } + } else if (ui.item.category === catMembers) { + if (ui.item.p === UNNAMED) { + url += ui.item.c + ".html" + "#"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; + } + if (ui.item.u) { + url += ui.item.u; + } else { + url += ui.item.l; + } + } else if (ui.item.category === catSearchTags) { + url += ui.item.u; + } + if (top !== window) { + parent.classFrame.location = pathtoroot + url; + } else { + window.location.href = pathtoroot + url; + } + $("#search-input").focus(); + } + } + }); +}); diff --git a/src/main/java/JSON-Java/serialized-form.html b/src/main/java/JSON-Java/serialized-form.html new file mode 100644 index 0000000..856ba3f --- /dev/null +++ b/src/main/java/JSON-Java/serialized-form.html @@ -0,0 +1,86 @@ + + + + +Serialized Form + + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Serialized Form

    +
    + +
    +
    +
    + + diff --git a/src/main/java/JSON-Java/stylesheet.css b/src/main/java/JSON-Java/stylesheet.css new file mode 100644 index 0000000..6dc5b36 --- /dev/null +++ b/src/main/java/JSON-Java/stylesheet.css @@ -0,0 +1,866 @@ +/* + * Javadoc style sheet + */ + +@import url('resources/fonts/dejavu.css'); + +/* + * Styles for individual HTML elements. + * + * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular + * HTML element throughout the page. + */ + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; + padding:0; + height:100%; + width:100%; +} +iframe { + margin:0; + padding:0; + height:100%; + width:100%; + overflow-y:scroll; + border:none; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a[href]:hover, a[href]:focus { + text-decoration:none; + color:#bb7a2a; +} +a[name] { + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; +} +h4 { + font-size:15px; +} +h5 { + font-size:14px; +} +h6 { + font-size:13px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; +} +:not(h1, h2, h3, h4, h5, h6) > code, +:not(h1, h2, h3, h4, h5, h6) > tt { + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +.summary-table dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +button { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size: 14px; +} +/* + * Styles for HTML generated by javadoc. + * + * These are style classes that are used by the standard doclet to generate HTML documentation. + */ + +/* + * Styles for document title and copyright. + */ +.clear { + clear:both; + height:0; + overflow:hidden; +} +.about-language { + float:right; + padding:0 21px 8px 8px; + font-size:11px; + margin-top:-9px; + height:2.9em; +} +.legal-copy { + margin-left:.5em; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* + * Styles for navigation bar. + */ +@media screen { + .flex-box { + position:fixed; + display:flex; + flex-direction:column; + height: 100%; + width: 100%; + } + .flex-header { + flex: 0 0 auto; + } + .flex-content { + flex: 1 1 auto; + overflow-y: auto; + } +} +.top-nav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + min-height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.sub-nav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.sub-nav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list { + padding-top:5px; +} +ul.nav-list { + display:block; + margin:0 25px 0 0; + padding:0; +} +ul.sub-nav-list { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.nav-list li { + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list-search { + float:right; + margin:0 0 0 0; + padding:5px 6px; + clear:none; +} +.nav-list-search label { + position:relative; + right:-16px; +} +ul.sub-nav-list li { + list-style:none; + float:left; + padding-top:10px; +} +.top-nav a:link, .top-nav a:active, .top-nav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.top-nav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.nav-bar-cell1-rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skip-nav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* + * Hide navigation links and search box in print layout + */ +@media print { + ul.nav-list, div.sub-nav { + display:none; + } +} +/* + * Styles for page header and footer. + */ +.title { + color:#2c4557; + margin:10px 0; +} +.sub-title { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* + * Styles for headings. + */ +body.class-declaration-page .summary h2, +body.class-declaration-page .details h2, +body.class-use-page h2, +body.module-declaration-page .block-list h2 { + font-style: italic; + padding:0; + margin:15px 0; +} +body.class-declaration-page .summary h3, +body.class-declaration-page .details h3, +body.class-declaration-page .summary .inherited-list h2 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +/* + * Styles for page layout containers. + */ +main { + clear:both; + padding:10px 20px; + position:relative; +} +dl.notes > dt { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +dl.notes > dd { + margin:5px 10px 10px 0; + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +dl.name-value > dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +dl.name-value > dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* + * Styles for lists. + */ +li.circle { + list-style:circle; +} +ul.horizontal li { + display:inline; + font-size:0.9em; +} +div.inheritance { + margin:0; + padding:0; +} +div.inheritance div.inheritance { + margin-left:2em; +} +ul.block-list, +ul.details-list, +ul.member-list, +ul.summary-list { + margin:10px 0 10px 0; + padding:0; +} +ul.block-list > li, +ul.details-list > li, +ul.member-list > li, +ul.summary-list > li { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +.summary-table dl, .summary-table dl dt, .summary-table dl dd { + margin-top:0; + margin-bottom:1px; +} +ul.see-list, ul.see-list-long { + padding-left: 0; + list-style: none; +} +ul.see-list li { + display: inline; +} +ul.see-list li:not(:last-child):after, +ul.see-list-long li:not(:last-child):after { + content: ", "; + white-space: pre-wrap; +} +/* + * Styles for tables. + */ +.summary-table, .details-table { + width:100%; + border-spacing:0; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; + padding:0; +} +.caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0; + padding-top:10px; + padding-left:1px; + margin:0; + white-space:pre; +} +.caption a:link, .caption a:visited { + color:#1f389c; +} +.caption a:hover, +.caption a:active { + color:#FFFFFF; +} +.caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +div.table-tabs { + padding:10px 0 0 1px; + margin:0; +} +div.table-tabs > button { + border: none; + cursor: pointer; + padding: 5px 12px 7px 12px; + font-weight: bold; + margin-right: 3px; +} +div.table-tabs > button.active-table-tab { + background: #F8981D; + color: #253441; +} +div.table-tabs > button.table-tab { + background: #4D7A97; + color: #FFFFFF; +} +.two-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); +} +.three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, auto); +} +.four-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(10%, max-content) minmax(10%, max-content) minmax(10%, auto); +} +@media screen and (max-width: 600px) { + .two-column-summary { + display: grid; + grid-template-columns: 1fr; + } +} +@media screen and (max-width: 800px) { + .three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(25%, auto); + } + .three-column-summary .col-last { + grid-column-end: span 2; + } +} +@media screen and (max-width: 1000px) { + .four-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); + } +} +.summary-table > div, .details-table > div { + text-align:left; + padding: 8px 3px 3px 7px; +} +.col-first, .col-second, .col-last, .col-constructor-name, .col-summary-item-name { + vertical-align:top; + padding-right:0; + padding-top:8px; + padding-bottom:3px; +} +.table-header { + background:#dee3e9; + font-weight: bold; +} +.col-first, .col-first { + font-size:13px; +} +.col-second, .col-second, .col-last, .col-constructor-name, .col-summary-item-name, .col-last { + font-size:13px; +} +.col-first, .col-second, .col-constructor-name { + vertical-align:top; + overflow: auto; +} +.col-last { + white-space:normal; +} +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-constructor-name a:link, .col-constructor-name a:visited, +.col-summary-item-name a:link, .col-summary-item-name a:visited, +.constant-values-container a:link, .constant-values-container a:visited, +.all-classes-container a:link, .all-classes-container a:visited, +.all-packages-container a:link, .all-packages-container a:visited { + font-weight:bold; +} +.table-sub-heading-color { + background-color:#EEEEFF; +} +.even-row-color, .even-row-color .table-header { + background-color:#FFFFFF; +} +.odd-row-color, .odd-row-color .table-header { + background-color:#EEEEEF; +} +/* + * Styles for contents. + */ +.deprecated-content { + margin:0; + padding:10px 0; +} +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +.col-last div { + padding-top:0; +} +.col-last a { + padding-bottom:3px; +} +.module-signature, +.package-signature, +.type-signature, +.member-signature { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + margin:14px 0; + white-space: pre-wrap; +} +.module-signature, +.package-signature, +.type-signature { + margin-top: 0; +} +.member-signature .type-parameters-long, +.member-signature .parameters, +.member-signature .exceptions { + display: inline-block; + vertical-align: top; + white-space: pre; +} +.member-signature .type-parameters { + white-space: normal; +} +/* + * Styles for formatting effect. + */ +.source-line-no { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:0 10px 5px 0; + color:#474747; +} +.deprecated-label, .descfrm-type-label, .implementation-label, .member-name-label, .member-name-link, +.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type, +.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label { + font-weight:bold; +} +.deprecation-comment, .help-footnote, .preview-comment { + font-style:italic; +} +.deprecation-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +.preview-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +div.block div.deprecation-comment { + font-style:normal; +} +/* + * Styles specific to HTML5 elements. + */ +main, nav, header, footer, section { + display:block; +} +/* + * Styles for javadoc search. + */ +.ui-autocomplete-category { + font-weight:bold; + font-size:15px; + padding:7px 0 7px 3px; + background-color:#4D7A97; + color:#FFFFFF; +} +.ui-autocomplete { + max-height:85%; + max-width:65%; + overflow-y:scroll; + overflow-x:scroll; + white-space:nowrap; + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); +} +ul.ui-autocomplete { + position:fixed; + z-index:999999; + background-color: #FFFFFF; +} +ul.ui-autocomplete li { + float:left; + clear:both; + width:100%; +} +.ui-autocomplete .result-item { + font-size: inherit; +} +.ui-autocomplete .result-highlight { + font-weight:bold; +} +#search-input { + background-image:url('resources/glass.png'); + background-size:13px; + background-repeat:no-repeat; + background-position:2px 3px; + padding-left:20px; + position:relative; + right:-18px; + width:400px; +} +#reset-button { + background-color: rgb(255,255,255); + background-image:url('resources/x.png'); + background-position:center; + background-repeat:no-repeat; + background-size:12px; + border:0 none; + width:16px; + height:16px; + position:relative; + left:-4px; + top:-4px; + font-size:0px; +} +.watermark { + color:#545454; +} +.search-tag-desc-result { + font-style:italic; + font-size:11px; +} +.search-tag-holder-result { + font-style:italic; + font-size:12px; +} +.search-tag-result:target { + background-color:yellow; +} +.module-graph span { + display:none; + position:absolute; +} +.module-graph:hover span { + display:block; + margin: -100px 0 0 100px; + z-index: 1; +} +.inherited-list { + margin: 10px 0 10px 0; +} +section.class-description { + line-height: 1.4; +} +.summary section[class$="-summary"], .details section[class$="-details"], +.class-uses .detail, .serialized-class-details { + padding: 0px 20px 5px 10px; + border: 1px solid #ededed; + background-color: #f8f8f8; +} +.inherited-list, section[class$="-details"] .detail { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +.vertical-separator { + padding: 0 5px; +} +ul.help-section-list { + margin: 0; +} +ul.help-subtoc > li { + display: inline-block; + padding-right: 5px; + font-size: smaller; +} +ul.help-subtoc > li::before { + content: "\2022" ; + padding-right:2px; +} +span.help-note { + font-style: italic; +} +/* + * Indicator icon for external links. + */ +main a[href*="://"]::after { + content:""; + display:inline-block; + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); + background-size:100% 100%; + width:7px; + height:7px; + margin-left:2px; + margin-bottom:4px; +} +main a[href*="://"]:hover::after, +main a[href*="://"]:focus::after { + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); +} + +/* + * Styles for user-provided tables. + * + * borderless: + * No borders, vertical margins, styled caption. + * This style is provided for use with existing doc comments. + * In general, borderless tables should not be used for layout purposes. + * + * plain: + * Plain borders around table and cells, vertical margins, styled caption. + * Best for small tables or for complex tables for tables with cells that span + * rows and columns, when the "striped" style does not work well. + * + * striped: + * Borders around the table and vertical borders between cells, striped rows, + * vertical margins, styled caption. + * Best for tables that have a header row, and a body containing a series of simple rows. + */ + +table.borderless, +table.plain, +table.striped { + margin-top: 10px; + margin-bottom: 10px; +} +table.borderless > caption, +table.plain > caption, +table.striped > caption { + font-weight: bold; + font-size: smaller; +} +table.borderless th, table.borderless td, +table.plain th, table.plain td, +table.striped th, table.striped td { + padding: 2px 5px; +} +table.borderless, +table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th, +table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td { + border: none; +} +table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr { + background-color: transparent; +} +table.plain { + border-collapse: collapse; + border: 1px solid black; +} +table.plain > thead > tr, table.plain > tbody tr, table.plain > tr { + background-color: transparent; +} +table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th, +table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td { + border: 1px solid black; +} +table.striped { + border-collapse: collapse; + border: 1px solid black; +} +table.striped > thead { + background-color: #E3E3E3; +} +table.striped > thead > tr > th, table.striped > thead > tr > td { + border: 1px solid black; +} +table.striped > tbody > tr:nth-child(even) { + background-color: #EEE +} +table.striped > tbody > tr:nth-child(odd) { + background-color: #FFF +} +table.striped > tbody > tr > th, table.striped > tbody > tr > td { + border-left: 1px solid black; + border-right: 1px solid black; +} +table.striped > tbody > tr > th { + font-weight: normal; +} +/** + * Tweak font sizes and paddings for small screens. + */ +@media screen and (max-width: 1050px) { + #search-input { + width: 300px; + } +} +@media screen and (max-width: 800px) { + #search-input { + width: 200px; + } + .top-nav, + .bottom-nav { + font-size: 11px; + padding-top: 6px; + } + .sub-nav { + font-size: 11px; + } + .about-language { + padding-right: 16px; + } + ul.nav-list li, + .sub-nav .nav-list-search { + padding: 6px; + } + ul.sub-nav-list li { + padding-top: 5px; + } + main { + padding: 10px; + } + .summary section[class$="-summary"], .details section[class$="-details"], + .class-uses .detail, .serialized-class-details { + padding: 0 8px 5px 8px; + } + body { + -webkit-text-size-adjust: none; + } +} +@media screen and (max-width: 500px) { + #search-input { + width: 150px; + } + .top-nav, + .bottom-nav { + font-size: 10px; + } + .sub-nav { + font-size: 10px; + } + .about-language { + font-size: 10px; + padding-right: 12px; + } +} diff --git a/src/main/java/JSON-Java/tag-search-index.js b/src/main/java/JSON-Java/tag-search-index.js new file mode 100644 index 0000000..bf10aaf --- /dev/null +++ b/src/main/java/JSON-Java/tag-search-index.js @@ -0,0 +1 @@ +tagSearchIndex = [{"l":"Constant Field Values","h":"","u":"constant-values.html"},{"l":"Serialized Form","h":"","u":"serialized-form.html"}];updateSearchResults(); \ No newline at end of file diff --git a/src/main/java/JSON-Java/type-search-index.js b/src/main/java/JSON-Java/type-search-index.js new file mode 100644 index 0000000..7d5a945 --- /dev/null +++ b/src/main/java/JSON-Java/type-search-index.js @@ -0,0 +1 @@ +typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"org.json","l":"JSONPointer.Builder"},{"p":"org.json","l":"CDL"},{"p":"org.json","l":"Cookie"},{"p":"org.json","l":"CookieList"},{"p":"org.json","l":"HTTP"},{"p":"org.json","l":"HTTPTokener"},{"p":"org.json","l":"JSONArray"},{"p":"org.json","l":"JSONException"},{"p":"org.json","l":"JSONML"},{"p":"org.json","l":"JSONMLParserConfiguration"},{"p":"org.json","l":"JSONObject"},{"p":"org.json","l":"JSONParserConfiguration"},{"p":"org.json","l":"JSONPointer"},{"p":"org.json","l":"JSONPointerException"},{"p":"org.json","l":"JSONPropertyIgnore"},{"p":"org.json","l":"JSONPropertyName"},{"p":"org.json","l":"JSONString"},{"p":"org.json","l":"JSONStringer"},{"p":"org.json","l":"JSONTokener"},{"p":"org.json","l":"JSONWriter"},{"p":"org.json","l":"ParserConfiguration"},{"p":"org.json","l":"Property"},{"p":"org.json","l":"XML"},{"p":"org.json","l":"XMLParserConfiguration"},{"p":"org.json","l":"XMLTokener"},{"p":"org.json","l":"XMLXsiTypeConverter"}];updateSearchResults(); \ No newline at end of file