blob: 26670ede97ca9a864430b7c4cc62d18bd2f6ca86 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Sun Mar 17 10:38:08 PDT 2013 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
JSONObject (Apache Wink 1.3.0 API)
</TITLE>
<META NAME="date" CONTENT="2013-03-17">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="JSONObject (Apache Wink 1.3.0 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JSONObject.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONString.html" title="interface in org.apache.wink.json4j"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/wink/json4j/JSONObject.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="JSONObject.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;<A HREF="#nested_classes_inherited_from_class_java.util.AbstractMap">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.wink.json4j</FONT>
<BR>
Class JSONObject</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractMap.html?is-external=true" title="class or interface in java.util">java.util.AbstractMap</A>&lt;K,V&gt;
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">java.util.HashMap</A>
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.wink.json4j.JSONObject</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>, <A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html" title="interface in org.apache.wink.json4j">JSONArtifact</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/apache/wink/json4j/OrderedJSONObject.html" title="class in org.apache.wink.json4j">OrderedJSONObject</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>JSONObject</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</A><DT>implements <A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html" title="interface in org.apache.wink.json4j">JSONArtifact</A></DL>
</PRE>
<P>
Models a JSON Object.
Extension of HashMap that only allows String keys, and values which are JSON-able (such as a Java Bean).
<BR><BR>
JSON-able values are: null, and instances of String, Boolean, Number, JSONObject and JSONArray.
<BR><BR>
Instances of this class are not thread-safe.
<P>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#org.apache.wink.json4j.JSONObject">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
</TABLE>
&nbsp;<A NAME="nested_classes_inherited_from_class_java.util.AbstractMap"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Nested classes/interfaces inherited from class java.util.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractMap.html?is-external=true" title="class or interface in java.util">AbstractMap</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractMap.SimpleEntry.html?is-external=true" title="class or interface in java.util">AbstractMap.SimpleEntry</A>&lt;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractMap.SimpleEntry.html?is-external=true" title="class or interface in java.util">K</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractMap.SimpleEntry.html?is-external=true" title="class or interface in java.util">V</A>&gt;, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractMap.SimpleImmutableEntry.html?is-external=true" title="class or interface in java.util">AbstractMap.SimpleImmutableEntry</A>&lt;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractMap.SimpleImmutableEntry.html?is-external=true" title="class or interface in java.util">K</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractMap.SimpleImmutableEntry.html?is-external=true" title="class or interface in java.util">V</A>&gt;</CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#NULL">NULL</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A constant definition reference to Java null.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#JSONObject()">JSONObject</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of this class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#JSONObject(java.io.InputStream)">JSONObject</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A>&nbsp;is)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of this class from the data provided from the input stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#JSONObject(java.io.InputStream, boolean)">JSONObject</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A>&nbsp;is,
boolean&nbsp;strict)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of this class from the data provided from the input stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#JSONObject(org.apache.wink.json4j.JSONObject, java.lang.String[])">JSONObject</A></B>(<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A>&nbsp;obj,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]&nbsp;keys)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of this class taking selected values from the underlying one.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#JSONObject(java.util.Map)">JSONObject</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&nbsp;map)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of this class using the contents of the provided map.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#JSONObject(java.util.Map, boolean)">JSONObject</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&nbsp;map,
boolean&nbsp;includeSuperclass)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of this class using the contents of the provided map.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#JSONObject(java.lang.Object)">JSONObject</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;javaBean)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of this class using the properties of the provided JavaBean.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#JSONObject(java.lang.Object, boolean)">JSONObject</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;javaBean,
boolean&nbsp;includeSuperclass)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of this class using the properties of the provided JavaBean.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#JSONObject(java.io.Reader)">JSONObject</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;rdr)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of this class from the data provided from the reader.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#JSONObject(java.io.Reader, boolean)">JSONObject</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;rdr,
boolean&nbsp;strict)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of this class from the data provided from the reader.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#JSONObject(java.lang.String)">JSONObject</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;str)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of this class from the provided JSON object string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#JSONObject(java.lang.String, boolean)">JSONObject</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;str,
boolean&nbsp;strict)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of this class from the provided JSON object string.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#append(java.lang.String, java.lang.Object)">append</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to append the 'value' object to the element at entry 'key'.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#get(java.lang.String)">get</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to obtain the object value for a key.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#getBoolean(java.lang.String)">getBoolean</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'boolean' value
Only boolean true, false, and the String true and false will return.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#getDouble(java.lang.String)">getDouble</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'double' value
Only values of Number will be converted to double, all other types will generate an exception
Provided for compatibility to other JSON models.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#getInt(java.lang.String)">getInt</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'int' value
Only values of Number will be converted to integer, all other types will generate an exception.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONArray.html" title="class in org.apache.wink.json4j">JSONArray</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#getJSONArray(java.lang.String)">getJSONArray</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a JSONArray
Only values that are instances of JSONArray will be returned.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#getJSONObject(java.lang.String)">getJSONObject</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a JSONObject
Only values that are instances of JSONObject will be returned.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#getLong(java.lang.String)">getLong</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'long' value
Only values of Number will be converted to long, all other types will generate an exception.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#getNames(org.apache.wink.json4j.JSONObject)">getNames</A></B>(<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A>&nbsp;obj)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function that returns a String[] of all the names of the keys (attributes) of this JSONObject</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;short</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#getShort(java.lang.String)">getShort</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'short' value
Only values of Number will be converted to short, all other types will generate an exception.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#getString(java.lang.String)">getString</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'string' value
Only values that can be easily converted to string will be returned.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#has(java.lang.String)">has</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to test if a key exists in the JSONObject.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#isNull(java.lang.String)">isNull</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to test if a key is mapped to null.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#isValidObject(java.lang.Object)">isValidObject</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;object)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return whether the object is a valid value for a property.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#isValidType(java.lang.Class)">isValidType</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&nbsp;clazz)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return whether the class is a valid type of value for a property.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#keys()">keys</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function that returns an iterator of all the keys (attributes) of this JSONObject</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#length()">length</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to return the number of keys in this JSONObject.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONArray.html" title="class in org.apache.wink.json4j">JSONArray</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#names()">names</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function that returns a JSONArray of all the names of the keys (attributes) of this JSONObject</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#opt(java.lang.String)">opt</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to obtain the object value for a key.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#optBoolean(java.lang.String)">optBoolean</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'boolean' value
Only returns true if the value is boolean true or the string 'true'.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#optBoolean(java.lang.String, boolean)">optBoolean</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
boolean&nbsp;defaultValue)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'boolean' value
Only returns true if the value is boolean true or the string 'true'.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#optDouble(java.lang.String)">optDouble</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'double' value
Only values of Number will be converted to double.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#optDouble(java.lang.String, double)">optDouble</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
double&nbsp;defaultValue)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'double' value
Only values of Number will be converted to double.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#optInt(java.lang.String)">optInt</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'int' value
Provided for compatibility to other JSON models.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#optInt(java.lang.String, int)">optInt</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
int&nbsp;defaultValue)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'int' value
Provided for compatibility to other JSON models.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONArray.html" title="class in org.apache.wink.json4j">JSONArray</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#optJSONArray(java.lang.String)">optJSONArray</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a JSONArray
Only values that are instances of JSONArray will be returned.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONArray.html" title="class in org.apache.wink.json4j">JSONArray</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#optJSONArray(java.lang.String, org.apache.wink.json4j.JSONArray)">optJSONArray</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="../../../../org/apache/wink/json4j/JSONArray.html" title="class in org.apache.wink.json4j">JSONArray</A>&nbsp;defaultValue)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a JSONArray
Only values that are instances of JSONArray will be returned.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#optJSONObject(java.lang.String)">optJSONObject</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a JSONObject
Only values that are instances of JSONObject will be returned.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#optJSONObject(java.lang.String, org.apache.wink.json4j.JSONObject)">optJSONObject</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A>&nbsp;defaultValue)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a JSONObject
Only values that are instances of JSONObject will be returned.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#optLong(java.lang.String)">optLong</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'long' value
Only values of Number will be converted to long.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#optLong(java.lang.String, long)">optLong</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
long&nbsp;defaultValue)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'long' value
Only values of Number will be converted to long.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;short</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#optShort(java.lang.String)">optShort</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'short' value
Only values of Number will be converted to short.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;short</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#optShort(java.lang.String, short)">optShort</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
short&nbsp;defaultValue)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'short' value
Only values of Number will be converted to short.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#optString(java.lang.String)">optString</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'string' value
Only values that can be easily converted to string will be returned.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#optString(java.lang.String, java.lang.String)">optString</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;defaultValue)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to obtain the specified key as a 'string' value
Only values that can be easily converted to string will be returned.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#put(java.lang.Object, java.lang.Object)">put</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(non-Javadoc)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#put(java.lang.Object, java.lang.Object, boolean)">put</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value,
boolean&nbsp;includeSuperclass)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(non-Javadoc)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#put(java.lang.String, boolean)">put</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
boolean&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to add an atomic boolean to the JSONObject.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#put(java.lang.String, java.util.Collection)">put</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to add a Collection as a new JSONArray contained in this JSONObject</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#put(java.lang.String, java.util.Collection, boolean)">put</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&nbsp;value,
boolean&nbsp;includeSuperclass)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to add a Collection as a new JSONArray contained in this JSONObject</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#put(java.lang.String, double)">put</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
double&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to add an atomic double to the JSONObject.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#put(java.lang.String, int)">put</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
int&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to add an atomic integer to the JSONObject.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#put(java.lang.String, long)">put</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
long&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to add an atomic long to the JSONObject.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#put(java.lang.String, java.util.Map)">put</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to add a Map as a new JSONObject contained in this JSONObject
Same as calling put(String, Map, true);</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#put(java.lang.String, java.util.Map, boolean)">put</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&nbsp;value,
boolean&nbsp;includeSuperclass)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to add a Map as a new JSONObject contained in this JSONObject</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#put(java.lang.String, java.lang.Object)">put</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Similar to default HashMap put, except it returns JSONObject instead of Object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#put(java.lang.String, java.lang.Object[])">put</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>[]&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to add an Object array as a new JSONArray contained in this JSONObject</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#put(java.lang.String, java.lang.Object[], boolean)">put</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>[]&nbsp;value,
boolean&nbsp;includeSuperclass)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to add an Object array as a new JSONArray contained in this JSONObject</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#put(java.lang.String, short)">put</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
short&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method to add an atomic short to the JSONObject.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#putOnce(java.lang.String, java.lang.Object)">putOnce</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Put a key/value pair into the JSONObject, but only if key/value are both not null, and only if the key is not present already.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#putOpt(java.lang.String, java.lang.Object)">putOpt</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Put a key/value pair into the JSONObject, but only if the key and value are non-null.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#sortedKeys()">sortedKeys</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function that returns an iterator of all the keys (attributes) of this JSONObject sorted in lexicographic manner (String.compareTo).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONArray.html" title="class in org.apache.wink.json4j">JSONArray</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#toJSONArray(org.apache.wink.json4j.JSONArray)">toJSONArray</A></B>(<A HREF="../../../../org/apache/wink/json4j/JSONArray.html" title="class in org.apache.wink.json4j">JSONArray</A>&nbsp;names)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Produce a JSONArray containing the values of the members of this JSONObject</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#toString()">toString</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Over-ridden toString() method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#toString(boolean)">toString</A></B>(boolean&nbsp;verbose)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Verbose capable toString method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#toString(int)">toString</A></B>(int&nbsp;indentDepth)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Function to return a string of JSON text with specified indention.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#write()">write</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert this object into a String of JSON text.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#write(boolean)">write</A></B>(boolean&nbsp;verbose)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert this object into a String of JSON text, specifying whether to use verbose (tab-indented) output or not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#write(int)">write</A></B>(int&nbsp;indentDepth)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert this object into a String of JSON text, specifying how many spaces should be used for each indent.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#write(java.io.OutputStream)">write</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;os)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write this object to the stream as JSON text in UTF-8 encoding.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#write(java.io.OutputStream, boolean)">write</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;os,
boolean&nbsp;verbose)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert this object into a stream of JSON text.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#write(java.io.OutputStream, int)">write</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;os,
int&nbsp;indentDepth)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write this object to the stream as JSON text in UTF-8 encoding, specifying how many spaces should be used for each indent.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#write(java.io.Writer)">write</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A>&nbsp;writer)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write this object to the writer as JSON text.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#write(java.io.Writer, boolean)">write</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A>&nbsp;writer,
boolean&nbsp;verbose)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write this object to the writer as JSON text in UTF-8 encoding, specifying whether to use verbose (tab-indented) output or not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/wink/json4j/JSONObject.html#write(java.io.Writer, int)">write</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A>&nbsp;writer,
int&nbsp;indentDepth)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write this object to the writer as JSON text, specifying how many spaces should be used for each indent.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.util.HashMap"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.util.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true#clear()" title="class or interface in java.util">clear</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true#clone()" title="class or interface in java.util">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true#containsKey(java.lang.Object)" title="class or interface in java.util">containsKey</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true#containsValue(java.lang.Object)" title="class or interface in java.util">containsValue</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true#entrySet()" title="class or interface in java.util">entrySet</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true#get(java.lang.Object)" title="class or interface in java.util">get</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true#isEmpty()" title="class or interface in java.util">isEmpty</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true#keySet()" title="class or interface in java.util">keySet</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true#putAll(java.util.Map)" title="class or interface in java.util">putAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true#remove(java.lang.Object)" title="class or interface in java.util">remove</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true#size()" title="class or interface in java.util">size</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true#values()" title="class or interface in java.util">values</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.util.AbstractMap"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.util.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractMap.html?is-external=true" title="class or interface in java.util">AbstractMap</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractMap.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractMap.html?is-external=true#hashCode()" title="class or interface in java.util">hashCode</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.util.Map"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface java.util.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html?is-external=true#hashCode()" title="class or interface in java.util">hashCode</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="NULL"><!-- --></A><H3>
NULL</H3>
<PRE>
public static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>NULL</B></PRE>
<DL>
<DD>A constant definition reference to Java null.
Provided for API compatibility with other JSON parsers.
<P>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="JSONObject()"><!-- --></A><H3>
JSONObject</H3>
<PRE>
public <B>JSONObject</B>()</PRE>
<DL>
<DD>Create a new instance of this class.
<P>
</DL>
<HR>
<A NAME="JSONObject(org.apache.wink.json4j.JSONObject, java.lang.String[])"><!-- --></A><H3>
JSONObject</H3>
<PRE>
public <B>JSONObject</B>(<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A>&nbsp;obj,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]&nbsp;keys)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Create a new instance of this class taking selected values from the underlying one. If a key is not
found, then it will be copied into the new JSONObject.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - The JSONObject to extract values from.<DD><CODE>keys</CODE> - The keys to take from the JSONObject and apply to this instance.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown if a key is duplicated in the string[] keys</DL>
</DL>
<HR>
<A NAME="JSONObject(java.lang.String)"><!-- --></A><H3>
JSONObject</H3>
<PRE>
public <B>JSONObject</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;str)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Create a new instance of this class from the provided JSON object string.
Note: This is the same as new JSONObject(str, false); Parsing in non-strict mode.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>str</CODE> - The JSON string to parse.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown when the string passed is null, or malformed JSON..</DL>
</DL>
<HR>
<A NAME="JSONObject(java.lang.String, boolean)"><!-- --></A><H3>
JSONObject</H3>
<PRE>
public <B>JSONObject</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;str,
boolean&nbsp;strict)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Create a new instance of this class from the provided JSON object string.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>str</CODE> - The JSON string to parse.<DD><CODE>strict</CODE> - Whether or not to parse in 'strict' mode, meaning all strings must be quoted (including identifiers), and comments are not allowed.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown when the string passed is null, or malformed JSON..</DL>
</DL>
<HR>
<A NAME="JSONObject(java.io.Reader)"><!-- --></A><H3>
JSONObject</H3>
<PRE>
public <B>JSONObject</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;rdr)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Create a new instance of this class from the data provided from the reader. The reader content must be a JSON object string.
Note: The reader will not be closed, that is left to the caller.
Note: This is the same as new JSONObject(rdr, false); Parsing in non-strict mode.
<P>
<DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown when the string passed is null, or malformed JSON..</DL>
</DL>
<HR>
<A NAME="JSONObject(java.io.Reader, boolean)"><!-- --></A><H3>
JSONObject</H3>
<PRE>
public <B>JSONObject</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;rdr,
boolean&nbsp;strict)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Create a new instance of this class from the data provided from the reader. The reader content must be a JSON object string.
Note: The reader will not be closed, that is left to the caller.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>rdr</CODE> - The reader from which to read the JSON.<DD><CODE>strict</CODE> - Whether or not to parse in 'strict' mode, meaning all strings must be quoted (including identifiers), and comments are not allowed.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown when the string passed is null, or malformed JSON..</DL>
</DL>
<HR>
<A NAME="JSONObject(java.io.InputStream)"><!-- --></A><H3>
JSONObject</H3>
<PRE>
public <B>JSONObject</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A>&nbsp;is)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Create a new instance of this class from the data provided from the input stream. The stream content must be a JSON object string.
Note: The input stream content is assumed to be UTF-8 encoded.
Note: The InputStream will not be closed, that is left to the caller.
Note: This is the same as new JSONObject(is, false); Parsing in non-strict mode.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>is</CODE> - The InputStream from which to read the JSON.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown when the string passed is null, or malformed JSON..</DL>
</DL>
<HR>
<A NAME="JSONObject(java.io.InputStream, boolean)"><!-- --></A><H3>
JSONObject</H3>
<PRE>
public <B>JSONObject</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A>&nbsp;is,
boolean&nbsp;strict)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Create a new instance of this class from the data provided from the input stream. The stream content must be a JSON object string.
Note: The input stream content is assumed to be UTF-8 encoded.
Note: The InputStream will not be closed, that is left to the caller.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>is</CODE> - The InputStream from which to read the JSON.<DD><CODE>strict</CODE> - Whether or not to parse in 'strict' mode, meaning all strings must be quoted (including identifiers), and comments are not allowed.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown when the string passed is null, or malformed JSON..</DL>
</DL>
<HR>
<A NAME="JSONObject(java.util.Map)"><!-- --></A><H3>
JSONObject</H3>
<PRE>
public <B>JSONObject</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&nbsp;map)</PRE>
<DL>
<DD>Create a new instance of this class using the contents of the provided map.
The contents of the map should be values considered JSONable.
It will try to convert JavaBeans in the map to JSONObjects if possible.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>map</CODE> - The map of key/value pairs to insert into this JSON object</DL>
</DL>
<HR>
<A NAME="JSONObject(java.lang.Object)"><!-- --></A><H3>
JSONObject</H3>
<PRE>
public <B>JSONObject</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;javaBean)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Create a new instance of this class using the properties of the provided JavaBean.
The bean is converted to a JSONObject via reflection of getter methods.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>javaBean</CODE> - A java bean with getters for properties.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown when contents in the map cannot be made JSONable.
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - Thrown if the map is null, or a key in the map is null..</DL>
</DL>
<HR>
<A NAME="JSONObject(java.lang.Object, boolean)"><!-- --></A><H3>
JSONObject</H3>
<PRE>
public <B>JSONObject</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;javaBean,
boolean&nbsp;includeSuperclass)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Create a new instance of this class using the properties of the provided JavaBean.
The bean is converted to a JSONObject via reflection of getter methods.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>javaBean</CODE> - A java bean with getters for properties.<DD><CODE>includeSuperclass</CODE> - Boolean indicating that if the object is a JavaBean, include superclass getter properties.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown when contents in the map cannot be made JSONable.
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - Thrown if the map is null, or a key in the map is null..</DL>
</DL>
<HR>
<A NAME="JSONObject(java.util.Map, boolean)"><!-- --></A><H3>
JSONObject</H3>
<PRE>
public <B>JSONObject</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&nbsp;map,
boolean&nbsp;includeSuperclass)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Create a new instance of this class using the contents of the provided map.
The contents of the map should be values considered JSONable.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>map</CODE> - The map of key/value pairs to insert into this JSON object<DD><CODE>includeSuperclass</CODE> - For values of the map which are JavaBeans, include superclass getter properties.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown when contents in the map cannot be made JSONable.
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - Thrown if the map is null, or a key in the map is null..</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="isValidObject(java.lang.Object)"><!-- --></A><H3>
isValidObject</H3>
<PRE>
public static boolean <B>isValidObject</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;object)</PRE>
<DL>
<DD>Return whether the object is a valid value for a property.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>object</CODE> - The object to check for validity as a JSON property value.
<DT><B>Returns:</B><DD>boolean indicating if the provided object is directly convertable to JSON.</DL>
</DD>
</DL>
<HR>
<A NAME="isValidType(java.lang.Class)"><!-- --></A><H3>
isValidType</H3>
<PRE>
public static boolean <B>isValidType</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&nbsp;clazz)</PRE>
<DL>
<DD>Return whether the class is a valid type of value for a property.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>clazz</CODE> - The class type to check for validity as a JSON object type.
<DT><B>Returns:</B><DD>boolean indicating if the provided class is directly convertable to JSON.</DL>
</DD>
</DL>
<HR>
<A NAME="write(java.io.OutputStream)"><!-- --></A><H3>
write</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> <B>write</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;os)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Write this object to the stream as JSON text in UTF-8 encoding. Same as calling write(os,false);
Note that encoding is always written as UTF-8, as per JSON spec.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html#write(java.io.OutputStream)">write</A></CODE> in interface <CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html" title="interface in org.apache.wink.json4j">JSONArtifact</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>os</CODE> - The output stream to write data to.
<DT><B>Returns:</B><DD>The passed in OutputStream.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown on IO errors during serialization.</DL>
</DD>
</DL>
<HR>
<A NAME="write(java.io.OutputStream, boolean)"><!-- --></A><H3>
write</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> <B>write</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;os,
boolean&nbsp;verbose)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Convert this object into a stream of JSON text. Same as calling write(writer,false);
Note that encoding is always written as UTF-8, as per JSON spec.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html#write(java.io.OutputStream, boolean)">write</A></CODE> in interface <CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html" title="interface in org.apache.wink.json4j">JSONArtifact</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>os</CODE> - The output stream to write data to.<DD><CODE>verbose</CODE> - Whether or not to write the JSON text in a verbose format.
<DT><B>Returns:</B><DD>The passed in OutputStream.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown on IO errors during serialization.</DL>
</DD>
</DL>
<HR>
<A NAME="write(java.io.OutputStream, int)"><!-- --></A><H3>
write</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> <B>write</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;os,
int&nbsp;indentDepth)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Write this object to the stream as JSON text in UTF-8 encoding, specifying how many spaces should be used for each indent.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html#write(java.io.OutputStream, int)">write</A></CODE> in interface <CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html" title="interface in org.apache.wink.json4j">JSONArtifact</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>indentDepth</CODE> - How many spaces to use for each indent level. Should be one to eight.
Less than one means no intending, greater than 8 and it will just use tab.
<DT><B>Returns:</B><DD>The passed in OutputStream.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown on IO errors during serialization.</DL>
</DD>
</DL>
<HR>
<A NAME="write(java.io.Writer)"><!-- --></A><H3>
write</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A> <B>write</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A>&nbsp;writer)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Write this object to the writer as JSON text. Same as calling write(writer,false);
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html#write(java.io.Writer)">write</A></CODE> in interface <CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html" title="interface in org.apache.wink.json4j">JSONArtifact</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>writer</CODE> - The writer which to write the JSON text to.
<DT><B>Returns:</B><DD>The passed in writer.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown on IO errors during serialization.</DL>
</DD>
</DL>
<HR>
<A NAME="write(java.io.Writer, boolean)"><!-- --></A><H3>
write</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A> <B>write</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A>&nbsp;writer,
boolean&nbsp;verbose)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Write this object to the writer as JSON text in UTF-8 encoding, specifying whether to use verbose (tab-indented) output or not.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html#write(java.io.Writer, boolean)">write</A></CODE> in interface <CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html" title="interface in org.apache.wink.json4j">JSONArtifact</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>writer</CODE> - The writer which to write the JSON text to.
<DT><B>Returns:</B><DD>The passed in writer.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown on IO errors during serialization.</DL>
</DD>
</DL>
<HR>
<A NAME="write(java.io.Writer, int)"><!-- --></A><H3>
write</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A> <B>write</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A>&nbsp;writer,
int&nbsp;indentDepth)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Write this object to the writer as JSON text, specifying how many spaces should be used for each indent.
This is an alternate indent style to using tabs.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html#write(java.io.Writer, int)">write</A></CODE> in interface <CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html" title="interface in org.apache.wink.json4j">JSONArtifact</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>writer</CODE> - The writer which to write the JSON text to.<DD><CODE>indentDepth</CODE> - How many spaces to use for each indent. The value should be between one to eight.
<DT><B>Returns:</B><DD>The passed in writer.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown on errors during serialization.</DL>
</DD>
</DL>
<HR>
<A NAME="write(int)"><!-- --></A><H3>
write</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>write</B>(int&nbsp;indentDepth)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Convert this object into a String of JSON text, specifying how many spaces should be used for each indent.
This is an alternate indent style to using tabs.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html#write(int)">write</A></CODE> in interface <CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html" title="interface in org.apache.wink.json4j">JSONArtifact</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>indentDepth</CODE> - How many spaces to use for each indent. The value should be between one to eight.
Less than one means no indenting, greater than 8 and it will just use tab.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown on errors during serialization.</DL>
</DD>
</DL>
<HR>
<A NAME="write(boolean)"><!-- --></A><H3>
write</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>write</B>(boolean&nbsp;verbose)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Convert this object into a String of JSON text, specifying whether to use verbose (tab-indented) output or not.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html#write(boolean)">write</A></CODE> in interface <CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html" title="interface in org.apache.wink.json4j">JSONArtifact</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>verbose</CODE> - Whether or not to write in compressed format.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown on errors during serialization.</DL>
</DD>
</DL>
<HR>
<A NAME="write()"><!-- --></A><H3>
write</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>write</B>()
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Convert this object into a String of JSON text. Same as write(false);
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html#write()">write</A></CODE> in interface <CODE><A HREF="../../../../org/apache/wink/json4j/JSONArtifact.html" title="interface in org.apache.wink.json4j">JSONArtifact</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown on IO errors during serialization.</DL>
</DD>
</DL>
<HR>
<A NAME="get(java.lang.String)"><!-- --></A><H3>
get</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>get</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Method to obtain the object value for a key.
This string-based method is provided for API compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key (attribute) name to obtain the value for.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown if the noted key is not in the map of key/value pairs.</DL>
</DD>
</DL>
<HR>
<A NAME="opt(java.lang.String)"><!-- --></A><H3>
opt</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>opt</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</PRE>
<DL>
<DD>Method to obtain the object value for a key. If the key is not in the map, null is returned.
This string-based method is provided for API compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key (attribute) name to obtain the value for.</DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.Object, java.lang.Object, boolean)"><!-- --></A><H3>
put</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>put</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value,
boolean&nbsp;includeSuperclass)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>(non-Javadoc)
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to put in the JSONObject<DD><CODE>value</CODE> - The value to put in the JSONObject<DD><CODE>includeSuperclass</CODE> - Boolean indicating that if the object is a JavaBean, include superclass getter properties.
<DT><B>Throws:</B>
<DD><CODE>JSONException.</CODE> - Thrown if key is null, not a string, or the value could not be converted.
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE><DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true#put(K, V)" title="class or interface in java.util"><CODE>HashMap.put(java.lang.Object, java.lang.Object)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
put</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>put</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</PRE>
<DL>
<DD>(non-Javadoc)
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html?is-external=true#put(K, V)" title="class or interface in java.util">put</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true#put(K, V)" title="class or interface in java.util">put</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true#put(K, V)" title="class or interface in java.util"><CODE>This is the same as calling put(key, value, true);</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.String, java.lang.Object)"><!-- --></A><H3>
put</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>put</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Similar to default HashMap put, except it returns JSONObject instead of Object.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>A reference to this object instance.
<DT><B>Throws:</B>
<DD><CODE>JSONException.</CODE> - Thrown if key is null, not a string, or the value could not be converted to JSON.
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE><DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html?is-external=true#put(K, V)" title="class or interface in java.util"><CODE>HashMap.put(java.lang.Object, java.lang.Object)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.String, boolean)"><!-- --></A><H3>
put</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>put</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
boolean&nbsp;value)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Method to add an atomic boolean to the JSONObject.
param key The key/attribute name to set the boolean at.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - The boolean value.
<DT><B>Returns:</B><DD>A reference to this object instance.
<DT><B>Throws:</B>
<DD><CODE>JSONException.</CODE> - Thrown if key is null or not a string.
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.String, double)"><!-- --></A><H3>
put</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>put</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
double&nbsp;value)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Method to add an atomic double to the JSONObject.
param key The key/attribute name to set the double at.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - The double value.
<DT><B>Returns:</B><DD>A reference to this object instance.
<DT><B>Throws:</B>
<DD><CODE>JSONException.</CODE> - Thrown if key is null or not a string.
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.String, int)"><!-- --></A><H3>
put</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>put</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
int&nbsp;value)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Method to add an atomic integer to the JSONObject.
param key The key/attribute name to set the integer at.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - The integer value.
<DT><B>Returns:</B><DD>A reference to this object instance.
<DT><B>Throws:</B>
<DD><CODE>JSONException.</CODE> - Thrown if key is null or not a string.
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.String, short)"><!-- --></A><H3>
put</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>put</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
short&nbsp;value)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Method to add an atomic short to the JSONObject.
param key The key/attribute name to set the integer at.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - The integer value.
<DT><B>Returns:</B><DD>A reference to this object instance.
<DT><B>Throws:</B>
<DD><CODE>JSONException.</CODE> - Thrown if key is null or not a string.
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.String, long)"><!-- --></A><H3>
put</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>put</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
long&nbsp;value)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Method to add an atomic long to the JSONObject.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key/attribute name to set the long to.<DD><CODE>value</CODE> - The long value.
<DT><B>Returns:</B><DD>A reference to this object instance.
<DT><B>Throws:</B>
<DD><CODE>JSONException.</CODE> - Thrown if key is null or not a string.
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.String, java.util.Map, boolean)"><!-- --></A><H3>
put</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>put</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&nbsp;value,
boolean&nbsp;includeSuperclass)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Method to add a Map as a new JSONObject contained in this JSONObject
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key/attribute name to set the new JSONObject to.<DD><CODE>value</CODE> - The Map object to convert to a JSONObject and store.<DD><CODE>includeSuperclass</CODE> - For values of the map which are JavaBeans and are converted, include superclass getter properties.
<DT><B>Returns:</B><DD>A reference to this object instance.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown when contents in the map cannot be converted to something JSONable.</DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.String, java.util.Map)"><!-- --></A><H3>
put</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>put</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&nbsp;value)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Method to add a Map as a new JSONObject contained in this JSONObject
Same as calling put(String, Map, true);
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key/attribute name to set the new JSONObject to.<DD><CODE>value</CODE> - The Map object to convert to a JSONObject and store.
<DT><B>Returns:</B><DD>A reference to this object instance.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown when contents in the map cannot be converted to something JSONable.</DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.String, java.util.Collection, boolean)"><!-- --></A><H3>
put</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>put</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&nbsp;value,
boolean&nbsp;includeSuperclass)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Method to add a Collection as a new JSONArray contained in this JSONObject
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key/attribute name to set the collection to.<DD><CODE>value</CODE> - The Map object to convert to a JSONObject and store.<DD><CODE>includeSuperclass</CODE> - For values of the map which are JavaBeans and are converted, include superclass getter properties.
<DT><B>Returns:</B><DD>A reference to this object instance.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown when contents in the Collection cannot be converted to something JSONable.</DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.String, java.util.Collection)"><!-- --></A><H3>
put</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>put</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&nbsp;value)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Method to add a Collection as a new JSONArray contained in this JSONObject
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key/attribute name to set the collection to.<DD><CODE>value</CODE> - The Map object to convert to a JSONObject and store.
<DT><B>Returns:</B><DD>A reference to this object instance.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown when contents in the Collection cannot be converted to something JSONable.</DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.String, java.lang.Object[])"><!-- --></A><H3>
put</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>put</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>[]&nbsp;value)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Method to add an Object array as a new JSONArray contained in this JSONObject
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key/attribute name to set the collection to.<DD><CODE>value</CODE> - The Object array to convert to a JSONArray and store.
<DT><B>Returns:</B><DD>A reference to this object instance.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown when contents in the Collection cannot be converted to something JSONable.</DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.String, java.lang.Object[], boolean)"><!-- --></A><H3>
put</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>put</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>[]&nbsp;value,
boolean&nbsp;includeSuperclass)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Method to add an Object array as a new JSONArray contained in this JSONObject
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key/attribute name to set the collection to.<DD><CODE>value</CODE> - The Object array to convert to a JSONArray and store.<DD><CODE>includeSuperclass</CODE> - For values of the Object array which are JavaBeans and are converted, include superclass getter properties.
<DT><B>Returns:</B><DD>A reference to this object instance.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown when contents in the Collection cannot be converted to something JSONable.</DL>
</DD>
</DL>
<HR>
<A NAME="getBoolean(java.lang.String)"><!-- --></A><H3>
getBoolean</H3>
<PRE>
public boolean <B>getBoolean</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'boolean' value
Only boolean true, false, and the String true and false will return. In this case null, the number 0, and empty string should be treated as false.
everything else is true.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.
throws JSONException Thrown when the type returned by get(key) is not a boolean instance, or the strings 'true' or 'false'.
<DT><B>Returns:</B><DD>A boolean value (true or false), if the value stored for key is a Boolean, or the strings 'true' or 'false'.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="optBoolean(java.lang.String)"><!-- --></A><H3>
optBoolean</H3>
<PRE>
public boolean <B>optBoolean</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'boolean' value
Only returns true if the value is boolean true or the string 'true'. All other values return false.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.
<DT><B>Returns:</B><DD>A boolean value (true or false), if the value stored for key is a Boolean, or the strings 'true' or 'false'.</DL>
</DD>
</DL>
<HR>
<A NAME="optBoolean(java.lang.String, boolean)"><!-- --></A><H3>
optBoolean</H3>
<PRE>
public boolean <B>optBoolean</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
boolean&nbsp;defaultValue)</PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'boolean' value
Only returns true if the value is boolean true or the string 'true'. All other values return false.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.<DD><CODE>defaultValue</CODE> - The default value to return.
<DT><B>Returns:</B><DD>A boolean value (true or false), if the value stored for key is a Boolean, or the strings 'true' or 'false'.</DL>
</DD>
</DL>
<HR>
<A NAME="getDouble(java.lang.String)"><!-- --></A><H3>
getDouble</H3>
<PRE>
public double <B>getDouble</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'double' value
Only values of Number will be converted to double, all other types will generate an exception
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.
throws JSONException Thrown when the type returned by get(key) is not a Double instance, or cannot be converted to a double.
<DT><B>Returns:</B><DD>A double value if the value stored for key is an instance of Number.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="optDouble(java.lang.String)"><!-- --></A><H3>
optDouble</H3>
<PRE>
public double <B>optDouble</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'double' value
Only values of Number will be converted to double. all other values will return Double.NaN.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.
<DT><B>Returns:</B><DD>A double value if the value stored for key is an instance of Number.</DL>
</DD>
</DL>
<HR>
<A NAME="optDouble(java.lang.String, double)"><!-- --></A><H3>
optDouble</H3>
<PRE>
public double <B>optDouble</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
double&nbsp;defaultValue)</PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'double' value
Only values of Number will be converted to double. all other values will return Double.NaN.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.<DD><CODE>defaultValue</CODE> - The default double value to return in case of NaN/null values in map.
<DT><B>Returns:</B><DD>A double value if the value stored for key is an instance of Number.</DL>
</DD>
</DL>
<HR>
<A NAME="getShort(java.lang.String)"><!-- --></A><H3>
getShort</H3>
<PRE>
public short <B>getShort</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'short' value
Only values of Number will be converted to short, all other types will generate an exception.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.
throws JSONException Thrown when the type returned by get(key) is not a Short instance, or cannot be converted to a short.
<DT><B>Returns:</B><DD>A short value if the value stored for key is an instance of Number.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="optShort(java.lang.String)"><!-- --></A><H3>
optShort</H3>
<PRE>
public short <B>optShort</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'short' value
Only values of Number will be converted to short. All other types return 0.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.
<DT><B>Returns:</B><DD>A short value if the value stored for key is an instance of Number. 0 otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="optShort(java.lang.String, short)"><!-- --></A><H3>
optShort</H3>
<PRE>
public short <B>optShort</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
short&nbsp;defaultValue)</PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'short' value
Only values of Number will be converted to short.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.<DD><CODE>defaultValue</CODE> - The default value to return in the case of null/nonNumber values in the map.
<DT><B>Returns:</B><DD>A short value if the value stored for key is an instance of Number. 0 otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="getInt(java.lang.String)"><!-- --></A><H3>
getInt</H3>
<PRE>
public int <B>getInt</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'int' value
Only values of Number will be converted to integer, all other types will generate an exception.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.
throws JSONException Thrown when the type returned by get(key) is not a Double instance, or cannot be converted to a double.
<DT><B>Returns:</B><DD>A int value if the value stored for key is an instance of Number.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="optInt(java.lang.String)"><!-- --></A><H3>
optInt</H3>
<PRE>
public int <B>optInt</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'int' value
Provided for compatibility to other JSON models.
Only values of Number will be converted to integer, all other types will return 0.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.
<DT><B>Returns:</B><DD>A int value if the value stored for key is an instance of Number. 0 otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="optInt(java.lang.String, int)"><!-- --></A><H3>
optInt</H3>
<PRE>
public int <B>optInt</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
int&nbsp;defaultValue)</PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'int' value
Provided for compatibility to other JSON models.
Only values of Number will be converted to integer
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.<DD><CODE>defaultValue</CODE> - The default int value to return in case of null/non-number values in the map.
<DT><B>Returns:</B><DD>A int value if the value stored for key is an instance of Number.</DL>
</DD>
</DL>
<HR>
<A NAME="getLong(java.lang.String)"><!-- --></A><H3>
getLong</H3>
<PRE>
public long <B>getLong</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'long' value
Only values of Number will be converted to long, all other types will generate an exception.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.
throws JSONException Thrown when the type returned by get(key) is not a Long instance, or cannot be converted to a long..
<DT><B>Returns:</B><DD>A long value if the value stored for key is an instance of Number.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="optLong(java.lang.String)"><!-- --></A><H3>
optLong</H3>
<PRE>
public long <B>optLong</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'long' value
Only values of Number will be converted to long. all other types return 0.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.
<DT><B>Returns:</B><DD>A long value if the value stored for key is an instance of Number, 0 otherwise.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="optLong(java.lang.String, long)"><!-- --></A><H3>
optLong</H3>
<PRE>
public long <B>optLong</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
long&nbsp;defaultValue)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'long' value
Only values of Number will be converted to long. all other types return 0.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.<DD><CODE>defaultValue</CODE> - The default long value to return in case of null/non Number values in the map.
<DT><B>Returns:</B><DD>A long value if the value stored for key is an instance of Number, defaultValue otherwise.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getString(java.lang.String)"><!-- --></A><H3>
getString</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getString</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'string' value
Only values that can be easily converted to string will be returned. A null will generate an exception.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.
throws JSONException Thrown when the type returned by get(key) is null.
<DT><B>Returns:</B><DD>A string value if the value if the value stored for key is not null.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="optString(java.lang.String)"><!-- --></A><H3>
optString</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>optString</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'string' value
Only values that can be easily converted to string will be returned. A null will generate an exception.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.
throws JSONException Thrown when the type returned by get(key) is null.
<DT><B>Returns:</B><DD>A string value if the value if the value stored for key is not null.</DL>
</DD>
</DL>
<HR>
<A NAME="optString(java.lang.String, java.lang.String)"><!-- --></A><H3>
optString</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>optString</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;defaultValue)</PRE>
<DL>
<DD>Utility method to obtain the specified key as a 'string' value
Only values that can be easily converted to string will be returned. A null will generate an exception.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.<DD><CODE>defaultValue</CODE> - The default String value to return in the case of null values in the map.
<DT><B>Returns:</B><DD>A string value if the value if the value stored for key is not null, defaultValue otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="getJSONObject(java.lang.String)"><!-- --></A><H3>
getJSONObject</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>getJSONObject</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Utility method to obtain the specified key as a JSONObject
Only values that are instances of JSONObject will be returned. A null will generate an exception.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.
throws JSONException Thrown when the type returned by get(key) is not a JSONObject instance.
<DT><B>Returns:</B><DD>A JSONObject value if the value stored for key is an instance or subclass of JSONObject.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="optJSONObject(java.lang.String)"><!-- --></A><H3>
optJSONObject</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>optJSONObject</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</PRE>
<DL>
<DD>Utility method to obtain the specified key as a JSONObject
Only values that are instances of JSONObject will be returned. A null will generate an exception.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.
<DT><B>Returns:</B><DD>A JSONObject value if the value stored for key is an instance or subclass of JSONObject, null otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="optJSONObject(java.lang.String, org.apache.wink.json4j.JSONObject)"><!-- --></A><H3>
optJSONObject</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>optJSONObject</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A>&nbsp;defaultValue)</PRE>
<DL>
<DD>Utility method to obtain the specified key as a JSONObject
Only values that are instances of JSONObject will be returned. A null will generate an exception.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.<DD><CODE>defaultValue</CODE> - The default JSONObject to return in the case of null/non JSONObject values in the map.
<DT><B>Returns:</B><DD>A JSONObject value if the value stored for key is an instance or subclass of JSONObject, defaultValue otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="getJSONArray(java.lang.String)"><!-- --></A><H3>
getJSONArray</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONArray.html" title="class in org.apache.wink.json4j">JSONArray</A> <B>getJSONArray</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Utility method to obtain the specified key as a JSONArray
Only values that are instances of JSONArray will be returned. A null will generate an exception.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.
throws JSONException Thrown when the type returned by get(key) is not a Long instance, or cannot be converted to a long..
<DT><B>Returns:</B><DD>A JSONArray value if the value stored for key is an instance or subclass of JSONArray.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="optJSONArray(java.lang.String)"><!-- --></A><H3>
optJSONArray</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONArray.html" title="class in org.apache.wink.json4j">JSONArray</A> <B>optJSONArray</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Utility method to obtain the specified key as a JSONArray
Only values that are instances of JSONArray will be returned. A null will generate an exception.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.
<DT><B>Returns:</B><DD>A JSONArray value if the value stored for key is an instance or subclass of JSONArray, null otherwise.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="optJSONArray(java.lang.String, org.apache.wink.json4j.JSONArray)"><!-- --></A><H3>
optJSONArray</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONArray.html" title="class in org.apache.wink.json4j">JSONArray</A> <B>optJSONArray</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="../../../../org/apache/wink/json4j/JSONArray.html" title="class in org.apache.wink.json4j">JSONArray</A>&nbsp;defaultValue)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Utility method to obtain the specified key as a JSONArray
Only values that are instances of JSONArray will be returned. A null will generate an exception.
Provided for compatibility to other JSON models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to look up.<DD><CODE>defaultValue</CODE> - The default value to return if the value in the map is null/not a JSONArray.
<DT><B>Returns:</B><DD>A JSONArray value if the value stored for key is an instance or subclass of JSONArray, defaultValue otherwise.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="putOnce(java.lang.String, java.lang.Object)"><!-- --></A><H3>
putOnce</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>putOnce</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Put a key/value pair into the JSONObject, but only if key/value are both not null, and only if the key is not present already.
Provided for compatibility to existing models.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The ket to place in the array<DD><CODE>value</CODE> - The value to place in the array
<DT><B>Returns:</B><DD>Reference to the current JSONObject.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - - Thrown if the key already exists or if key or value is null</DL>
</DD>
</DL>
<HR>
<A NAME="putOpt(java.lang.String, java.lang.Object)"><!-- --></A><H3>
putOpt</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>putOpt</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Put a key/value pair into the JSONObject, but only if the key and value are non-null.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The keey (attribute) name to assign to the value.<DD><CODE>value</CODE> - The value to put into the JSONObject.
<DT><B>Returns:</B><DD>Reference to the current JSONObject.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - - if the value is a non-finite number</DL>
</DD>
</DL>
<HR>
<A NAME="length()"><!-- --></A><H3>
length</H3>
<PRE>
public int <B>length</B>()</PRE>
<DL>
<DD>Method to return the number of keys in this JSONObject.
This function merely maps to HashMap.size(). Provided for API compatibility.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>returns the number of keys in the JSONObject.</DL>
</DD>
</DL>
<HR>
<A NAME="append(java.lang.String, java.lang.Object)"><!-- --></A><H3>
append</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A> <B>append</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Method to append the 'value' object to the element at entry 'key'.
If JSONObject.has(key) returns false, a new array is created and the value is appended to it.
If the object as position key is not an array, then a new JSONArray is created
and both current and new values are appended to it, then the value of the attribute is set to the new
array. If the current value is already an array, then 'value' is added to it.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key/attribute name to append to.<DD><CODE>value</CODE> - The value to append to it.
<DT><B>Returns:</B><DD>A reference to this object instance.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - Thrown if the value to append is not JSONAble.</DL>
</DD>
</DL>
<HR>
<A NAME="toJSONArray(org.apache.wink.json4j.JSONArray)"><!-- --></A><H3>
toJSONArray</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONArray.html" title="class in org.apache.wink.json4j">JSONArray</A> <B>toJSONArray</B>(<A HREF="../../../../org/apache/wink/json4j/JSONArray.html" title="class in org.apache.wink.json4j">JSONArray</A>&nbsp;names)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Produce a JSONArray containing the values of the members of this JSONObject
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>names</CODE> - - A JSONArray containing the a list of key strings. This determines the sequence of values in the result.
<DT><B>Returns:</B><DD>A JSONArray of the values found for the names provided.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE> - - if errors occur during storing the values in a JSONArray</DL>
</DD>
</DL>
<HR>
<A NAME="has(java.lang.String)"><!-- --></A><H3>
has</H3>
<PRE>
public boolean <B>has</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</PRE>
<DL>
<DD>Method to test if a key exists in the JSONObject.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to test.
<DT><B>Returns:</B><DD>true if the key is defined in the JSONObject (regardless of value), or false if the key is not in the JSONObject</DL>
</DD>
</DL>
<HR>
<A NAME="isNull(java.lang.String)"><!-- --></A><H3>
isNull</H3>
<PRE>
public boolean <B>isNull</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;key)</PRE>
<DL>
<DD>Method to test if a key is mapped to null.
This method will also return true if the key has not been put in the JSONObject yet.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to test for null.
<DT><B>Returns:</B><DD>true if the key is not in the map or if the value referenced by the key is null.</DL>
</DD>
</DL>
<HR>
<A NAME="keys()"><!-- --></A><H3>
keys</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A> <B>keys</B>()</PRE>
<DL>
<DD>Utility function that returns an iterator of all the keys (attributes) of this JSONObject
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>An iterator of all keys in the object.</DL>
</DD>
</DL>
<HR>
<A NAME="names()"><!-- --></A><H3>
names</H3>
<PRE>
public <A HREF="../../../../org/apache/wink/json4j/JSONArray.html" title="class in org.apache.wink.json4j">JSONArray</A> <B>names</B>()</PRE>
<DL>
<DD>Utility function that returns a JSONArray of all the names of the keys (attributes) of this JSONObject
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>All the keys in the JSONObject as a JSONArray.</DL>
</DD>
</DL>
<HR>
<A NAME="getNames(org.apache.wink.json4j.JSONObject)"><!-- --></A><H3>
getNames</H3>
<PRE>
public static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] <B>getNames</B>(<A HREF="../../../../org/apache/wink/json4j/JSONObject.html" title="class in org.apache.wink.json4j">JSONObject</A>&nbsp;obj)</PRE>
<DL>
<DD>Utility function that returns a String[] of all the names of the keys (attributes) of this JSONObject
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>All the keys in the JSONObject as a String[].</DL>
</DD>
</DL>
<HR>
<A NAME="sortedKeys()"><!-- --></A><H3>
sortedKeys</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A> <B>sortedKeys</B>()</PRE>
<DL>
<DD>Utility function that returns an iterator of all the keys (attributes) of this JSONObject sorted in lexicographic manner (String.compareTo).
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>An iterator of all keys in the object in lexicographic (character code) sorted order.</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE>
<DL>
<DD>Over-ridden toString() method. Returns the same value as write(), which is a compact JSON String.
If an error occurs in the serialization, the return will be of format: JSON Generation Error: [<some error>]
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractMap.html?is-external=true#toString()" title="class or interface in java.util">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractMap.html?is-external=true" title="class or interface in java.util">AbstractMap</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>A string of JSON text, if possible.</DL>
</DD>
</DL>
<HR>
<A NAME="toString(boolean)"><!-- --></A><H3>
toString</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>(boolean&nbsp;verbose)</PRE>
<DL>
<DD>Verbose capable toString method.
If an error occurs in the serialization, the return will be of format: JSON Generation Error: [<some error>]
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>verbose</CODE> - Whether or not to tab-indent the output.
<DT><B>Returns:</B><DD>A string of JSON text, if possible.</DL>
</DD>
</DL>
<HR>
<A NAME="toString(int)"><!-- --></A><H3>
toString</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>(int&nbsp;indentDepth)
throws <A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></PRE>
<DL>
<DD>Function to return a string of JSON text with specified indention. Returns the same value as write(indentDepth).
If an error occurs in the serialization, a JSONException is thrown.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>A string of JSON text, if possible.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j">JSONException</A></CODE></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JSONObject.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONException.html" title="class in org.apache.wink.json4j"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/wink/json4j/JSONString.html" title="interface in org.apache.wink.json4j"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/wink/json4j/JSONObject.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="JSONObject.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;<A HREF="#nested_classes_inherited_from_class_java.util.AbstractMap">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright &#169; 2009-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>