Reinstate JSON license notices in datarouter 79/20179/1
authorsg481n <sg481n@att.com>
Mon, 23 Oct 2017 15:57:53 +0000 (15:57 +0000)
committersg481n <sg481n@att.com>
Mon, 23 Oct 2017 15:57:58 +0000 (15:57 +0000)
Issue-ID: DMAAP-166
Change-Id: I14b15c12156ec783b5bf48e02d18bf5b01d18472
Signed-off-by: sg481n <sg481n@att.com>
17 files changed:
datarouter-prov/src/main/java/org/json/CDL.java
datarouter-prov/src/main/java/org/json/Cookie.java
datarouter-prov/src/main/java/org/json/CookieList.java
datarouter-prov/src/main/java/org/json/HTTP.java
datarouter-prov/src/main/java/org/json/HTTPTokener.java
datarouter-prov/src/main/java/org/json/JSONArray.java
datarouter-prov/src/main/java/org/json/JSONException.java
datarouter-prov/src/main/java/org/json/JSONML.java
datarouter-prov/src/main/java/org/json/JSONObject.java
datarouter-prov/src/main/java/org/json/JSONString.java
datarouter-prov/src/main/java/org/json/JSONStringer.java
datarouter-prov/src/main/java/org/json/JSONTokener.java
datarouter-prov/src/main/java/org/json/JSONWriter.java
datarouter-prov/src/main/java/org/json/LOGJSONObject.java
datarouter-prov/src/main/java/org/json/XML.java
datarouter-prov/src/main/java/org/json/XMLTokener.java
datarouter-prov/src/main/java/org/json/package.html

index 92f4c22..7e489a9 100644 (file)
  ******************************************************************************/\r
 package org.json;\r
 \r
+/*\r
+Copyright (c) 2002 JSON.org\r
 \r
+Permission is hereby granted, free of charge, to any person obtaining a copy\r
+of this software and associated documentation files (the "Software"), to deal\r
+in the Software without restriction, including without limitation the rights\r
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the Software is\r
+furnished to do so, subject to the following conditions:\r
+\r
+The above copyright notice and this permission notice shall be included in all\r
+copies or substantial portions of the Software.\r
+\r
+The Software shall be used for Good, not Evil.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+SOFTWARE.\r
+*/\r
+\r
+/**\r
+ * This provides static methods to convert comma delimited text into a\r
+ * JSONArray, and to covert a JSONArray into comma delimited text. Comma\r
+ * delimited text is a very popular format for data interchange. It is\r
+ * understood by most database, spreadsheet, and organizer programs.\r
+ * <p>\r
+ * Each row of text represents a row in a table or a data record. Each row\r
+ * ends with a NEWLINE character. Each row contains one or more values.\r
+ * Values are separated by commas. A value can contain any character except\r
+ * for comma, unless is is wrapped in single quotes or double quotes.\r
+ * <p>\r
+ * The first row usually contains the names of the columns.\r
+ * <p>\r
+ * A comma delimited list can be converted into a JSONArray of JSONObjects.\r
+ * The names for the elements in the JSONObjects can be taken from the names\r
+ * in the first row.\r
+ * @author JSON.org\r
+ * @version 2012-11-13\r
+ */\r
 public class CDL {\r
 \r
     /**\r
index cca9118..67e4f17 100644 (file)
  ******************************************************************************/\r
 package org.json;\r
 \r
+/*\r
+Copyright (c) 2002 JSON.org\r
 \r
+Permission is hereby granted, free of charge, to any person obtaining a copy\r
+of this software and associated documentation files (the "Software"), to deal\r
+in the Software without restriction, including without limitation the rights\r
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the Software is\r
+furnished to do so, subject to the following conditions:\r
+\r
+The above copyright notice and this permission notice shall be included in all\r
+copies or substantial portions of the Software.\r
+\r
+The Software shall be used for Good, not Evil.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+SOFTWARE.\r
+*/\r
+\r
+/**\r
+ * Convert a web browser cookie specification to a JSONObject and back.\r
+ * JSON and Cookies are both notations for name/value pairs.\r
+ * @author JSON.org\r
+ * @version 2010-12-24\r
+ */\r
 public class Cookie {\r
 \r
     /**\r
index a3dcdc3..89b7816 100644 (file)
  ******************************************************************************/\r
 package org.json;\r
 \r
-import java.util.Iterator;\r
+/*\r
+Copyright (c) 2002 JSON.org\r
+\r
+Permission is hereby granted, free of charge, to any person obtaining a copy\r
+of this software and associated documentation files (the "Software"), to deal\r
+in the Software without restriction, including without limitation the rights\r
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the Software is\r
+furnished to do so, subject to the following conditions:\r
+\r
+The above copyright notice and this permission notice shall be included in all\r
+copies or substantial portions of the Software.\r
 \r
+The Software shall be used for Good, not Evil.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+SOFTWARE.\r
+*/\r
+\r
+import java.util.Iterator;\r
 \r
+/**\r
+ * Convert a web browser cookie list string to a JSONObject and back.\r
+ * @author JSON.org\r
+ * @version 2010-12-24\r
+ */\r
 public class CookieList {\r
 \r
     /**\r
index d65f4ab..34ad3f5 100644 (file)
  ******************************************************************************/\r
 package org.json;\r
 \r
-\r
+/*\r
+Copyright (c) 2002 JSON.org\r
+\r
+Permission is hereby granted, free of charge, to any person obtaining a copy\r
+of this software and associated documentation files (the "Software"), to deal\r
+in the Software without restriction, including without limitation the rights\r
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the Software is\r
+furnished to do so, subject to the following conditions:\r
+\r
+The above copyright notice and this permission notice shall be included in all\r
+copies or substantial portions of the Software.\r
+\r
+The Software shall be used for Good, not Evil.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+SOFTWARE.\r
+*/\r
 \r
 import java.util.Iterator;\r
 \r
-\r
+/**\r
+ * Convert an HTTP header to a JSONObject and back.\r
+ * @author JSON.org\r
+ * @version 2010-12-24\r
+ */\r
 public class HTTP {\r
 \r
     /** Carriage return/line feed. */\r
index 8681b4b..0594e74 100644 (file)
  ******************************************************************************/\r
 package org.json;\r
 \r
+/*\r
+Copyright (c) 2002 JSON.org\r
 \r
+Permission is hereby granted, free of charge, to any person obtaining a copy\r
+of this software and associated documentation files (the "Software"), to deal\r
+in the Software without restriction, including without limitation the rights\r
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the Software is\r
+furnished to do so, subject to the following conditions:\r
+\r
+The above copyright notice and this permission notice shall be included in all\r
+copies or substantial portions of the Software.\r
+\r
+The Software shall be used for Good, not Evil.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+SOFTWARE.\r
+*/\r
+\r
+/**\r
+ * The HTTPTokener extends the JSONTokener to provide additional methods\r
+ * for the parsing of HTTP headers.\r
+ * @author JSON.org\r
+ * @version 2012-11-13\r
+ */\r
 public class HTTPTokener extends JSONTokener {\r
 \r
     /**\r
index 14f9ed2..c9e7c42 100644 (file)
  ******************************************************************************/\r
 package org.json;\r
 \r
+/*\r
+ Copyright (c) 2002 JSON.org\r
+\r
+ Permission is hereby granted, free of charge, to any person obtaining a copy\r
+ of this software and associated documentation files (the "Software"), to deal\r
+ in the Software without restriction, including without limitation the rights\r
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+ copies of the Software, and to permit persons to whom the Software is\r
+ furnished to do so, subject to the following conditions:\r
+\r
+ The above copyright notice and this permission notice shall be included in all\r
+ copies or substantial portions of the Software.\r
+\r
+ The Software shall be used for Good, not Evil.\r
+\r
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ SOFTWARE.\r
+ */\r
 \r
 import java.io.IOException;\r
 import java.io.StringWriter;\r
@@ -33,7 +56,52 @@ import java.util.Iterator;
 import java.util.List;\r
 import java.util.Map;\r
 \r
-\r
+/**\r
+ * A JSONArray is an ordered sequence of values. Its external text form is a\r
+ * string wrapped in square brackets with commas separating the values. The\r
+ * internal form is an object having <code>get</code> and <code>opt</code>\r
+ * methods for accessing the values by index, and <code>put</code> methods for\r
+ * adding or replacing values. The values can be any of these types:\r
+ * <code>Boolean</code>, <code>JSONArray</code>, <code>JSONObject</code>,\r
+ * <code>Number</code>, <code>String</code>, or the\r
+ * <code>JSONObject.NULL object</code>.\r
+ * <p>\r
+ * The constructor can convert a JSON text into a Java object. The\r
+ * <code>toString</code> method converts to JSON text.\r
+ * <p>\r
+ * A <code>get</code> method returns a value if one can be found, and throws an\r
+ * exception if one cannot be found. An <code>opt</code> method returns a\r
+ * default value instead of throwing an exception, and so is useful for\r
+ * obtaining optional values.\r
+ * <p>\r
+ * The generic <code>get()</code> and <code>opt()</code> methods return an\r
+ * object which you can cast or query for type. There are also typed\r
+ * <code>get</code> and <code>opt</code> methods that do type checking and type\r
+ * coercion for you.\r
+ * <p>\r
+ * The texts produced by the <code>toString</code> methods strictly conform to\r
+ * JSON syntax rules. The constructors are more forgiving in the texts they will\r
+ * accept:\r
+ * <ul>\r
+ * <li>An extra <code>,</code>&nbsp;<small>(comma)</small> may appear just\r
+ * before the closing bracket.</li>\r
+ * <li>The <code>null</code> value will be inserted when there is <code>,</code>\r
+ * &nbsp;<small>(comma)</small> elision.</li>\r
+ * <li>Strings may be quoted with <code>'</code>&nbsp;<small>(single\r
+ * quote)</small>.</li>\r
+ * <li>Strings do not need to be quoted at all if they do not begin with a quote\r
+ * or single quote, and if they do not contain leading or trailing spaces, and\r
+ * if they do not contain any of these characters:\r
+ * <code>{ } [ ] / \ : , = ; #</code> and if they do not look like numbers and\r
+ * if they are not the reserved words <code>true</code>, <code>false</code>, or\r
+ * <code>null</code>.</li>\r
+ * <li>Values can be separated by <code>;</code> <small>(semicolon)</small> as\r
+ * well as by <code>,</code> <small>(comma)</small>.</li>\r
+ * </ul>\r
+ *\r
+ * @author JSON.org\r
+ * @version 2012-11-13\r
+ */\r
 public class JSONArray {\r
 \r
     /**\r
index 6928042..2308eb2 100644 (file)
  ******************************************************************************/\r
 package org.json;\r
 \r
-\r
+/**\r
+ * The JSONException is thrown by the JSON.org classes when things are amiss.\r
+ *\r
+ * @author JSON.org\r
+ * @version 2013-02-10\r
+ */\r
 public class JSONException extends RuntimeException {\r
     private static final long serialVersionUID = 0;\r
     private Throwable cause;\r
 \r
-   \r
+    /**\r
+     * Constructs a JSONException with an explanatory message.\r
+     *\r
+     * @param message\r
+     *            Detail about the reason for the exception.\r
+     */\r
     public JSONException(String message) {\r
         super(message);\r
     }\r
index 4faaa32..5afb599 100644 (file)
  ******************************************************************************/\r
 package org.json;\r
 \r
-\r
+/*\r
+Copyright (c) 2008 JSON.org\r
+\r
+Permission is hereby granted, free of charge, to any person obtaining a copy\r
+of this software and associated documentation files (the "Software"), to deal\r
+in the Software without restriction, including without limitation the rights\r
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the Software is\r
+furnished to do so, subject to the following conditions:\r
+\r
+The above copyright notice and this permission notice shall be included in all\r
+copies or substantial portions of the Software.\r
+\r
+The Software shall be used for Good, not Evil.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+SOFTWARE.\r
+*/\r
 \r
 import java.util.Iterator;\r
 \r
+\r
+/**\r
+ * This provides static methods to convert an XML text into a JSONArray or\r
+ * JSONObject, and to covert a JSONArray or JSONObject into an XML text using\r
+ * the JsonML transform.\r
+ *\r
+ * @author JSON.org\r
+ * @version 2012-03-28\r
+ */\r
 public class JSONML {\r
 \r
     /**\r
index 6cdb722..b4b0fe5 100644 (file)
  ******************************************************************************/\r
 package org.json;\r
 \r
-\r
+/*\r
+Copyright (c) 2002 JSON.org\r
+\r
+Permission is hereby granted, free of charge, to any person obtaining a copy\r
+of this software and associated documentation files (the "Software"), to deal\r
+in the Software without restriction, including without limitation the rights\r
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the Software is\r
+furnished to do so, subject to the following conditions:\r
+\r
+The above copyright notice and this permission notice shall be included in all\r
+copies or substantial portions of the Software.\r
+\r
+The Software shall be used for Good, not Evil.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+SOFTWARE.\r
+*/\r
 \r
 import java.io.IOException;\r
 import java.io.StringWriter;\r
@@ -39,7 +61,60 @@ import java.util.Map;
 import java.util.ResourceBundle;\r
 import java.util.Set;\r
 \r
-\r
+/**\r
+ * A JSONObject is an unordered collection of name/value pairs. Its external\r
+ * form is a string wrapped in curly braces with colons between the names and\r
+ * values, and commas between the values and names. The internal form is an\r
+ * object having <code>get</code> and <code>opt</code> methods for accessing the\r
+ * values by name, and <code>put</code> methods for adding or replacing values\r
+ * by name. The values can be any of these types: <code>Boolean</code>,\r
+ * <code>JSONArray</code>, <code>JSONObject</code>, <code>Number</code>,\r
+ * <code>String</code>, or the <code>JSONObject.NULL</code> object. A JSONObject\r
+ * constructor can be used to convert an external form JSON text into an\r
+ * internal form whose values can be retrieved with the <code>get</code> and\r
+ * <code>opt</code> methods, or to convert values into a JSON text using the\r
+ * <code>put</code> and <code>toString</code> methods. A <code>get</code> method\r
+ * returns a value if one can be found, and throws an exception if one cannot be\r
+ * found. An <code>opt</code> method returns a default value instead of throwing\r
+ * an exception, and so is useful for obtaining optional values.\r
+ * <p>\r
+ * The generic <code>get()</code> and <code>opt()</code> methods return an\r
+ * object, which you can cast or query for type. There are also typed\r
+ * <code>get</code> and <code>opt</code> methods that do type checking and type\r
+ * coercion for you. The opt methods differ from the get methods in that they do\r
+ * not throw. Instead, they return a specified value, such as null.\r
+ * <p>\r
+ * The <code>put</code> methods add or replace values in an object. For example,\r
+ *\r
+ * <pre>\r
+ * myString = new JSONObject().put(&quot;JSON&quot;, &quot;Hello, World!&quot;).toString();\r
+ * </pre>\r
+ *\r
+ * produces the string <code>{"JSON": "Hello, World"}</code>.\r
+ * <p>\r
+ * The texts produced by the <code>toString</code> methods strictly conform to\r
+ * the JSON syntax rules. The constructors are more forgiving in the texts they\r
+ * will accept:\r
+ * <ul>\r
+ * <li>An extra <code>,</code>&nbsp;<small>(comma)</small> may appear just\r
+ * before the closing brace.</li>\r
+ * <li>Strings may be quoted with <code>'</code>&nbsp;<small>(single\r
+ * quote)</small>.</li>\r
+ * <li>Strings do not need to be quoted at all if they do not begin with a quote\r
+ * or single quote, and if they do not contain leading or trailing spaces, and\r
+ * if they do not contain any of these characters:\r
+ * <code>{ } [ ] / \ : , = ; #</code> and if they do not look like numbers and\r
+ * if they are not the reserved words <code>true</code>, <code>false</code>, or\r
+ * <code>null</code>.</li>\r
+ * <li>Keys can be followed by <code>=</code> or <code>=></code> as well as by\r
+ * <code>:</code>.</li>\r
+ * <li>Values can be followed by <code>;</code> <small>(semicolon)</small> as\r
+ * well as by <code>,</code> <small>(comma)</small>.</li>\r
+ * </ul>\r
+ *\r
+ * @author JSON.org\r
+ * @version 2012-12-01\r
+ */\r
 public class JSONObject {\r
     /**\r
      * The maximum number of keys in the key pool.\r
index d8772ef..d01ae33 100644 (file)
  * *\r
  ******************************************************************************/\r
 package org.json;\r
-\r
+/**\r
+ * The <code>JSONString</code> interface allows a <code>toJSONString()</code>\r
+ * method so that a class can change the behavior of\r
+ * <code>JSONObject.toString()</code>, <code>JSONArray.toString()</code>,\r
+ * and <code>JSONWriter.value(</code>Object<code>)</code>. The\r
+ * <code>toJSONString</code> method will be used instead of the default behavior\r
+ * of using the Object's <code>toString()</code> method and quoting the result.\r
+ */\r
 public interface JSONString {\r
-\r
+    /**\r
+     * The <code>toJSONString</code> method allows a class to produce its own JSON\r
+     * serialization.\r
+     *\r
+     * @return A strictly syntactically correct JSON text.\r
+     */\r
     public String toJSONString();\r
 }\r
index 87c8a5b..91b5877 100644 (file)
  ******************************************************************************/\r
 package org.json;\r
 \r
+/*\r
+Copyright (c) 2006 JSON.org\r
 \r
+Permission is hereby granted, free of charge, to any person obtaining a copy\r
+of this software and associated documentation files (the "Software"), to deal\r
+in the Software without restriction, including without limitation the rights\r
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the Software is\r
+furnished to do so, subject to the following conditions:\r
 \r
-import java.io.StringWriter;\r
+The above copyright notice and this permission notice shall be included in all\r
+copies or substantial portions of the Software.\r
+\r
+The Software shall be used for Good, not Evil.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+SOFTWARE.\r
+*/\r
 \r
+import java.io.StringWriter;\r
 \r
+/**\r
+ * JSONStringer provides a quick and convenient way of producing JSON text.\r
+ * The texts produced strictly conform to JSON syntax rules. No whitespace is\r
+ * added, so the results are ready for transmission or storage. Each instance of\r
+ * JSONStringer can produce one JSON text.\r
+ * <p>\r
+ * A JSONStringer instance provides a <code>value</code> method for appending\r
+ * values to the\r
+ * text, and a <code>key</code>\r
+ * method for adding keys before values in objects. There are <code>array</code>\r
+ * and <code>endArray</code> methods that make and bound array values, and\r
+ * <code>object</code> and <code>endObject</code> methods which make and bound\r
+ * object values. All of these methods return the JSONWriter instance,\r
+ * permitting cascade style. For example, <pre>\r
+ * myString = new JSONStringer()\r
+ *     .object()\r
+ *         .key("JSON")\r
+ *         .value("Hello, World!")\r
+ *     .endObject()\r
+ *     .toString();</pre> which produces the string <pre>\r
+ * {"JSON":"Hello, World!"}</pre>\r
+ * <p>\r
+ * The first method called must be <code>array</code> or <code>object</code>.\r
+ * There are no methods for adding commas or colons. JSONStringer adds them for\r
+ * you. Objects and arrays can be nested up to 20 levels deep.\r
+ * <p>\r
+ * This can sometimes be easier than using a JSONObject to build a string.\r
+ * @author JSON.org\r
+ * @version 2008-09-18\r
+ */\r
 public class JSONStringer extends JSONWriter {\r
     /**\r
      * Make a fresh JSONStringer. It can be used to build one JSON text.\r
@@ -35,7 +86,14 @@ public class JSONStringer extends JSONWriter {
         super(new StringWriter());\r
     }\r
 \r
-   \r
+    /**\r
+     * Return the JSON text. This method is used to obtain the product of the\r
+     * JSONStringer instance. It will return <code>null</code> if there was a\r
+     * problem in the construction of the JSON text (such as the calls to\r
+     * <code>array</code> were not properly balanced with calls to\r
+     * <code>endArray</code>).\r
+     * @return The JSON text.\r
+     */\r
     public String toString() {\r
         return this.mode == 'd' ? this.writer.toString() : null;\r
     }\r
index e6de931..816f52e 100644 (file)
@@ -29,8 +29,37 @@ import java.io.InputStreamReader;
 import java.io.Reader;\r
 import java.io.StringReader;\r
 \r
-\r
-\r
+/*\r
+Copyright (c) 2002 JSON.org\r
+\r
+Permission is hereby granted, free of charge, to any person obtaining a copy\r
+of this software and associated documentation files (the "Software"), to deal\r
+in the Software without restriction, including without limitation the rights\r
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the Software is\r
+furnished to do so, subject to the following conditions:\r
+\r
+The above copyright notice and this permission notice shall be included in all\r
+copies or substantial portions of the Software.\r
+\r
+The Software shall be used for Good, not Evil.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+SOFTWARE.\r
+*/\r
+\r
+/**\r
+ * A JSONTokener takes a source string and extracts characters and tokens from\r
+ * it. It is used by the JSONObject and JSONArray constructors to parse\r
+ * JSON source strings.\r
+ * @author JSON.org\r
+ * @version 2012-02-16\r
+ */\r
 public class JSONTokener {\r
 \r
     private long    character;\r
index ebb5ce0..a9b0bab 100644 (file)
@@ -25,8 +25,59 @@ package org.json;
 import java.io.IOException;\r
 import java.io.Writer;\r
 \r
+/*\r
+Copyright (c) 2006 JSON.org\r
 \r
+Permission is hereby granted, free of charge, to any person obtaining a copy\r
+of this software and associated documentation files (the "Software"), to deal\r
+in the Software without restriction, including without limitation the rights\r
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the Software is\r
+furnished to do so, subject to the following conditions:\r
 \r
+The above copyright notice and this permission notice shall be included in all\r
+copies or substantial portions of the Software.\r
+\r
+The Software shall be used for Good, not Evil.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+SOFTWARE.\r
+*/\r
+\r
+/**\r
+ * JSONWriter provides a quick and convenient way of producing JSON text.\r
+ * The texts produced strictly conform to JSON syntax rules. No whitespace is\r
+ * added, so the results are ready for transmission or storage. Each instance of\r
+ * JSONWriter can produce one JSON text.\r
+ * <p>\r
+ * A JSONWriter instance provides a <code>value</code> method for appending\r
+ * values to the\r
+ * text, and a <code>key</code>\r
+ * method for adding keys before values in objects. There are <code>array</code>\r
+ * and <code>endArray</code> methods that make and bound array values, and\r
+ * <code>object</code> and <code>endObject</code> methods which make and bound\r
+ * object values. All of these methods return the JSONWriter instance,\r
+ * permitting a cascade style. For example, <pre>\r
+ * new JSONWriter(myWriter)\r
+ *     .object()\r
+ *         .key("JSON")\r
+ *         .value("Hello, World!")\r
+ *     .endObject();</pre> which writes <pre>\r
+ * {"JSON":"Hello, World!"}</pre>\r
+ * <p>\r
+ * The first method called must be <code>array</code> or <code>object</code>.\r
+ * There are no methods for adding commas or colons. JSONWriter adds them for\r
+ * you. Objects and arrays can be nested up to 20 levels deep.\r
+ * <p>\r
+ * This can sometimes be easier than using a JSONObject to build a string.\r
+ * @author JSON.org\r
+ * @version 2011-11-24\r
+ */\r
 public class JSONWriter {\r
     private static final int maxdepth = 200;\r
 \r
index a5c32c7..2f18c54 100644 (file)
  ******************************************************************************/\r
 package org.json;\r
 \r
-\r
+/*\r
+Copyright (c) 2002 JSON.org\r
+\r
+Permission is hereby granted, free of charge, to any person obtaining a copy\r
+of this software and associated documentation files (the "Software"), to deal\r
+in the Software without restriction, including without limitation the rights\r
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the Software is\r
+furnished to do so, subject to the following conditions:\r
+\r
+The above copyright notice and this permission notice shall be included in all\r
+copies or substantial portions of the Software.\r
+\r
+The Software shall be used for Good, not Evil.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+SOFTWARE.\r
+*/\r
 \r
 import java.io.IOException;\r
 import java.io.StringWriter;\r
@@ -39,7 +61,60 @@ import java.util.Map;
 import java.util.ResourceBundle;\r
 import java.util.Set;\r
 \r
-\r
+/**\r
+ * A JSONObject is an unordered collection of name/value pairs. Its external\r
+ * form is a string wrapped in curly braces with colons between the names and\r
+ * values, and commas between the values and names. The internal form is an\r
+ * object having <code>get</code> and <code>opt</code> methods for accessing the\r
+ * values by name, and <code>put</code> methods for adding or replacing values\r
+ * by name. The values can be any of these types: <code>Boolean</code>,\r
+ * <code>JSONArray</code>, <code>JSONObject</code>, <code>Number</code>,\r
+ * <code>String</code>, or the <code>JSONObject.NULL</code> object. A JSONObject\r
+ * constructor can be used to convert an external form JSON text into an\r
+ * internal form whose values can be retrieved with the <code>get</code> and\r
+ * <code>opt</code> methods, or to convert values into a JSON text using the\r
+ * <code>put</code> and <code>toString</code> methods. A <code>get</code> method\r
+ * returns a value if one can be found, and throws an exception if one cannot be\r
+ * found. An <code>opt</code> method returns a default value instead of throwing\r
+ * an exception, and so is useful for obtaining optional values.\r
+ * <p>\r
+ * The generic <code>get()</code> and <code>opt()</code> methods return an\r
+ * object, which you can cast or query for type. There are also typed\r
+ * <code>get</code> and <code>opt</code> methods that do type checking and type\r
+ * coercion for you. The opt methods differ from the get methods in that they do\r
+ * not throw. Instead, they return a specified value, such as null.\r
+ * <p>\r
+ * The <code>put</code> methods add or replace values in an object. For example,\r
+ *\r
+ * <pre>\r
+ * myString = new JSONObject().put(&quot;JSON&quot;, &quot;Hello, World!&quot;).toString();\r
+ * </pre>\r
+ *\r
+ * produces the string <code>{"JSON": "Hello, World"}</code>.\r
+ * <p>\r
+ * The texts produced by the <code>toString</code> methods strictly conform to\r
+ * the JSON syntax rules. The constructors are more forgiving in the texts they\r
+ * will accept:\r
+ * <ul>\r
+ * <li>An extra <code>,</code>&nbsp;<small>(comma)</small> may appear just\r
+ * before the closing brace.</li>\r
+ * <li>Strings may be quoted with <code>'</code>&nbsp;<small>(single\r
+ * quote)</small>.</li>\r
+ * <li>Strings do not need to be quoted at all if they do not begin with a quote\r
+ * or single quote, and if they do not contain leading or trailing spaces, and\r
+ * if they do not contain any of these characters:\r
+ * <code>{ } [ ] / \ : , = ; #</code> and if they do not look like numbers and\r
+ * if they are not the reserved words <code>true</code>, <code>false</code>, or\r
+ * <code>null</code>.</li>\r
+ * <li>Keys can be followed by <code>=</code> or <code>=></code> as well as by\r
+ * <code>:</code>.</li>\r
+ * <li>Values can be followed by <code>;</code> <small>(semicolon)</small> as\r
+ * well as by <code>,</code> <small>(comma)</small>.</li>\r
+ * </ul>\r
+ *\r
+ * @author JSON.org\r
+ * @version 2012-12-01\r
+ */\r
 public class LOGJSONObject {\r
     /**\r
      * The maximum number of keys in the key pool.\r
index 8908180..33f43e5 100644 (file)
  ******************************************************************************/\r
 package org.json;\r
 \r
-\r
+/*\r
+Copyright (c) 2002 JSON.org\r
+\r
+Permission is hereby granted, free of charge, to any person obtaining a copy\r
+of this software and associated documentation files (the "Software"), to deal\r
+in the Software without restriction, including without limitation the rights\r
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the Software is\r
+furnished to do so, subject to the following conditions:\r
+\r
+The above copyright notice and this permission notice shall be included in all\r
+copies or substantial portions of the Software.\r
+\r
+The Software shall be used for Good, not Evil.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+SOFTWARE.\r
+*/\r
 \r
 import java.util.Iterator;\r
 \r
 \r
+/**\r
+ * This provides static methods to convert an XML text into a JSONObject,\r
+ * and to covert a JSONObject into an XML text.\r
+ * @author JSON.org\r
+ * @version 2012-10-26\r
+ */\r
 public class XML {\r
 \r
     /** The Character '&amp;'. */\r
index e2f12b7..bdb5466 100644 (file)
@@ -25,9 +25,36 @@ package org.json;
 import java.util.HashMap;\r
 import java.util.Map;\r
 \r
-\r
-\r
-\r
+/*\r
+Copyright (c) 2002 JSON.org\r
+\r
+Permission is hereby granted, free of charge, to any person obtaining a copy\r
+of this software and associated documentation files (the "Software"), to deal\r
+in the Software without restriction, including without limitation the rights\r
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the Software is\r
+furnished to do so, subject to the following conditions:\r
+\r
+The above copyright notice and this permission notice shall be included in all\r
+copies or substantial portions of the Software.\r
+\r
+The Software shall be used for Good, not Evil.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+SOFTWARE.\r
+*/\r
+\r
+/**\r
+ * The XMLTokener extends the JSONTokener to provide additional methods\r
+ * for the parsing of XML texts.\r
+ * @author JSON.org\r
+ * @version 2012-11-13\r
+ */\r
 public class XMLTokener extends JSONTokener {\r
 \r
 \r
index fad81ab..392a0c6 100644 (file)
 # * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
 # *\r
 #-------------------------------------------------------------------------------\r
+<!-- CVS: $Id: package.html,v 1.1 2013/04/26 21:01:51 eby Exp $ -->\r
+<!--\r
+                       AT&T - PROPRIETARY\r
+          THIS FILE CONTAINS PROPRIETARY INFORMATION OF\r
+       AT&T AND IS NOT TO BE DISCLOSED OR USED EXCEPT IN\r
+                   ACCORDANCE WITH APPLICABLE AGREEMENTS.\r
 \r
+           Copyright (c) 2013 AT&T Knowledge Ventures\r
+               Unpublished and Not for Publication\r
+                      All Rights Reserved\r
+-->\r
 <html>\r
 <body>\r
 <p>\r
-This package provides the JSON library.\r
+This package provides the json.org JSON library.\r
 </p>\r
 </body>\r
 </html>\r