gson-comments/gson/docs/javadocs/com/google/gson/JsonObject.html

463 lines
25 KiB
HTML

<!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_01) on Fri Aug 29 15:11:27 PDT 2008 -->
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>
JsonObject (Gson 1.2 API)
</TITLE>
<META NAME="date" CONTENT="2008-08-29">
<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 (Gson 1.2 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="../../../com/google/gson/JsonNull.html" title="class in com.google.gson"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/google/gson/JsonParseException.html" title="class in com.google.gson"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?com/google/gson/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;NESTED&nbsp;|&nbsp;FIELD&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;FIELD&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">
com.google.gson</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="../../../com/google/gson/JsonElement.html" title="class in com.google.gson">com.google.gson.JsonElement</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.google.gson.JsonObject</B>
</PRE>
<HR>
<DL>
<DT><PRE>public final class <B>JsonObject</B><DT>extends <A HREF="../../../com/google/gson/JsonElement.html" title="class in com.google.gson">JsonElement</A></DL>
</PRE>
<P>
A class representing an object type in Json. An object consists of name-value pairs where names
are strings, and values are any other type of <A HREF="../../../com/google/gson/JsonElement.html" title="class in com.google.gson"><CODE>JsonElement</CODE></A>. This allows for a creating a
tree of JsonElements. The member elements of this object are maintained in order they were added.
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Inderjeet Singh</DD>
</DL>
<HR>
<P>
<!-- ======== 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="../../../com/google/gson/JsonObject.html#JsonObject()">JsonObject</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an empty JsonObject.</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;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/gson/JsonObject.html#add(java.lang.String, com.google.gson.JsonElement)">add</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;property,
<A HREF="../../../com/google/gson/JsonElement.html" title="class in com.google.gson">JsonElement</A>&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a member, which is a name-value pair, to self.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/gson/JsonObject.html#addProperty(java.lang.String, java.lang.Number)">addProperty</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;property,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</A>&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to add a primitive member.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/gson/JsonObject.html#addProperty(java.lang.String, java.lang.String)">addProperty</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;property,
<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;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to add a primitive member.</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/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</A>&lt;<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>,<A HREF="../../../com/google/gson/JsonElement.html" title="class in com.google.gson">JsonElement</A>&gt;&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/gson/JsonObject.html#entrySet()">entrySet</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set of members of this object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../com/google/gson/JsonElement.html" title="class in com.google.gson">JsonElement</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/gson/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;memberName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the member with the specified name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson">JsonArray</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/gson/JsonObject.html#getAsJsonArray(java.lang.String)">getAsJsonArray</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;memberName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to get the specified member as a JsonArray.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../com/google/gson/JsonObject.html" title="class in com.google.gson">JsonObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/gson/JsonObject.html#getAsJsonObject(java.lang.String)">getAsJsonObject</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;memberName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to get the specified member as a JsonObject.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson">JsonPrimitive</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/gson/JsonObject.html#getAsJsonPrimitive(java.lang.String)">getAsJsonPrimitive</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;memberName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to get the specified member as a JsonPrimitive element.</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="../../../com/google/gson/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;memberName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to check if a member with the specified name is present in this object.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.google.gson.JsonElement"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.google.gson.<A HREF="../../../com/google/gson/JsonElement.html" title="class in com.google.gson">JsonElement</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../com/google/gson/JsonElement.html#getAsBigDecimal()">getAsBigDecimal</A>, <A HREF="../../../com/google/gson/JsonElement.html#getAsBigInteger()">getAsBigInteger</A>, <A HREF="../../../com/google/gson/JsonElement.html#getAsBoolean()">getAsBoolean</A>, <A HREF="../../../com/google/gson/JsonElement.html#getAsDouble()">getAsDouble</A>, <A HREF="../../../com/google/gson/JsonElement.html#getAsFloat()">getAsFloat</A>, <A HREF="../../../com/google/gson/JsonElement.html#getAsInt()">getAsInt</A>, <A HREF="../../../com/google/gson/JsonElement.html#getAsJsonArray()">getAsJsonArray</A>, <A HREF="../../../com/google/gson/JsonElement.html#getAsJsonNull()">getAsJsonNull</A>, <A HREF="../../../com/google/gson/JsonElement.html#getAsJsonObject()">getAsJsonObject</A>, <A HREF="../../../com/google/gson/JsonElement.html#getAsJsonPrimitive()">getAsJsonPrimitive</A>, <A HREF="../../../com/google/gson/JsonElement.html#getAsLong()">getAsLong</A>, <A HREF="../../../com/google/gson/JsonElement.html#getAsNumber()">getAsNumber</A>, <A HREF="../../../com/google/gson/JsonElement.html#getAsShort()">getAsShort</A>, <A HREF="../../../com/google/gson/JsonElement.html#getAsString()">getAsString</A>, <A HREF="../../../com/google/gson/JsonElement.html#isJsonArray()">isJsonArray</A>, <A HREF="../../../com/google/gson/JsonElement.html#isJsonNull()">isJsonNull</A>, <A HREF="../../../com/google/gson/JsonElement.html#isJsonObject()">isJsonObject</A>, <A HREF="../../../com/google/gson/JsonElement.html#isJsonPrimitive()">isJsonPrimitive</A>, <A HREF="../../../com/google/gson/JsonElement.html#toString()">toString</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#equals(java.lang.Object)" title="class or interface in java.lang">equals</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#hashCode()" title="class or interface in java.lang">hashCode</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;
<P>
<!-- ========= 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>Creates an empty JsonObject.
<P>
</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="add(java.lang.String, com.google.gson.JsonElement)"><!-- --></A><H3>
add</H3>
<PRE>
public void <B>add</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;property,
<A HREF="../../../com/google/gson/JsonElement.html" title="class in com.google.gson">JsonElement</A>&nbsp;value)</PRE>
<DL>
<DD>Adds a member, which is a name-value pair, to self. The name must be a String, but the value
can be an arbitrary JsonElement, thereby allowing you to build a full tree of JsonElements
rooted at this node.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>property</CODE> - name of the member.<DD><CODE>value</CODE> - the member object.</DL>
</DD>
</DL>
<HR>
<A NAME="addProperty(java.lang.String, java.lang.String)"><!-- --></A><H3>
addProperty</H3>
<PRE>
public void <B>addProperty</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;property,
<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;value)</PRE>
<DL>
<DD>Convenience method to add a primitive member. The specified value is converted to a
JsonPrimitive of String.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>property</CODE> - name of the member.<DD><CODE>value</CODE> - the string value associated with the member.</DL>
</DD>
</DL>
<HR>
<A NAME="addProperty(java.lang.String, java.lang.Number)"><!-- --></A><H3>
addProperty</H3>
<PRE>
public void <B>addProperty</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;property,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</A>&nbsp;value)</PRE>
<DL>
<DD>Convenience method to add a primitive member. The specified value is converted to a
JsonPrimitive of Number.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>property</CODE> - name of the member.<DD><CODE>value</CODE> - the number value associated with the member.</DL>
</DD>
</DL>
<HR>
<A NAME="entrySet()"><!-- --></A><H3>
entrySet</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</A>&lt;<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>,<A HREF="../../../com/google/gson/JsonElement.html" title="class in com.google.gson">JsonElement</A>&gt;&gt; <B>entrySet</B>()</PRE>
<DL>
<DD>Returns a set of members of this object. The set is ordered, and the order is in which the
elements were added.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a set of members of this object.</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;memberName)</PRE>
<DL>
<DD>Convenience method to check if a member with the specified name is present in this object.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>memberName</CODE> - name of the member that is being checked for presence.
<DT><B>Returns:</B><DD>true if there is a member with the specified name, false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="get(java.lang.String)"><!-- --></A><H3>
get</H3>
<PRE>
public <A HREF="../../../com/google/gson/JsonElement.html" title="class in com.google.gson">JsonElement</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;memberName)</PRE>
<DL>
<DD>Returns the member with the specified name.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>memberName</CODE> - name of the member that is being requested.
<DT><B>Returns:</B><DD>the member matching the name. Null if no such member exists.</DL>
</DD>
</DL>
<HR>
<A NAME="getAsJsonPrimitive(java.lang.String)"><!-- --></A><H3>
getAsJsonPrimitive</H3>
<PRE>
public <A HREF="../../../com/google/gson/JsonPrimitive.html" title="class in com.google.gson">JsonPrimitive</A> <B>getAsJsonPrimitive</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;memberName)</PRE>
<DL>
<DD>Convenience method to get the specified member as a JsonPrimitive element.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>memberName</CODE> - name of the member being requested.
<DT><B>Returns:</B><DD>the JsonPrimitive corresponding to the specified member.</DL>
</DD>
</DL>
<HR>
<A NAME="getAsJsonArray(java.lang.String)"><!-- --></A><H3>
getAsJsonArray</H3>
<PRE>
public <A HREF="../../../com/google/gson/JsonArray.html" title="class in com.google.gson">JsonArray</A> <B>getAsJsonArray</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;memberName)</PRE>
<DL>
<DD>Convenience method to get the specified member as a JsonArray.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>memberName</CODE> - name of the member being requested.
<DT><B>Returns:</B><DD>the JsonArray corresponding to the specified member.</DL>
</DD>
</DL>
<HR>
<A NAME="getAsJsonObject(java.lang.String)"><!-- --></A><H3>
getAsJsonObject</H3>
<PRE>
public <A HREF="../../../com/google/gson/JsonObject.html" title="class in com.google.gson">JsonObject</A> <B>getAsJsonObject</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;memberName)</PRE>
<DL>
<DD>Convenience method to get the specified member as a JsonObject.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>memberName</CODE> - name of the member being requested.
<DT><B>Returns:</B><DD>the JsonObject corresponding to the specified member.</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="../../../com/google/gson/JsonNull.html" title="class in com.google.gson"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/google/gson/JsonParseException.html" title="class in com.google.gson"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?com/google/gson/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;NESTED&nbsp;|&nbsp;FIELD&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;FIELD&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; 2008. All Rights Reserved.
</BODY>
</HTML>