<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">java.lang.Object</A>
<IMGSRC="../../../resources/inherit.gif"ALT="extended by "><B>com.google.gson.GsonBuilder</B>
</PRE>
<HR>
<DL>
<DT><PRE>public final class <B>GsonBuilder</B><DT>extends <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A></DL>
</PRE>
<P>
<p>Use this builder to construct a <AHREF="../../../com/google/gson/Gson.html"title="class in com.google.gson"><CODE>Gson</CODE></A> instance when you need to set configuration
options other than the default. For <AHREF="../../../com/google/gson/Gson.html"title="class in com.google.gson"><CODE>Gson</CODE></A> with default configuration, it is simpler to
<li> The default serialization of <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Date.html?is-external=true"title="class or interface in java.util"><CODE>Date</CODE></A> and its subclasses in Gson does
<CODE> <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/google/gson/GsonBuilder.html#addDeserializationExclusionStrategy(com.google.gson.ExclusionStrategy)">addDeserializationExclusionStrategy</A></B>(<AHREF="../../../com/google/gson/ExclusionStrategy.html"title="interface in com.google.gson">ExclusionStrategy</A> strategy)</CODE>
<BR>
Configures Gson to apply the passed in exclusion strategy during deserialization.</TD>
<CODE> <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/google/gson/GsonBuilder.html#addSerializationExclusionStrategy(com.google.gson.ExclusionStrategy)">addSerializationExclusionStrategy</A></B>(<AHREF="../../../com/google/gson/ExclusionStrategy.html"title="interface in com.google.gson">ExclusionStrategy</A> strategy)</CODE>
<BR>
Configures Gson to apply the passed in exclusion strategy during serialization.</TD>
Creates a <AHREF="../../../com/google/gson/Gson.html"title="class in com.google.gson"><CODE>Gson</CODE></A> instance based on the current configuration.</TD>
Configures Gson to exclude all fields from consideration for serialization or deserialization
that do not have the <AHREF="../../../com/google/gson/annotations/Expose.html"title="annotation in com.google.gson.annotations"><CODE>Expose</CODE></A> annotation.</TD>
Makes the output JSON non-executable in Javascript by prefixing the generated JSON with some
<CODE> <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/google/gson/GsonBuilder.html#registerTypeAdapter(java.lang.reflect.Type, java.lang.Object)">registerTypeAdapter</A></B>(<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/reflect/Type.html?is-external=true"title="class or interface in java.lang.reflect">Type</A> type,
<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> typeAdapter)</CODE>
<BR>
Configures Gson for custom serialization or deserialization.</TD>
<CODE> <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/google/gson/GsonBuilder.html#registerTypeAdapterFactory(com.google.gson.TypeAdapterFactory)">registerTypeAdapterFactory</A></B>(<AHREF="../../../com/google/gson/TypeAdapterFactory.html"title="interface in com.google.gson">TypeAdapterFactory</A> factory)</CODE>
<BR>
Register a factory for type adapters.</TD>
<CODE> <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/google/gson/GsonBuilder.html#registerTypeHierarchyAdapter(java.lang.Class, java.lang.Object)">registerTypeHierarchyAdapter</A></B>(<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Class.html?is-external=true"title="class or interface in java.lang">Class</A><?> baseType,
<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> typeAdapter)</CODE>
<BR>
Configures Gson for custom serialization or deserialization for an inheritance type hierarchy.</TD>
Configures Gson to to serialize <code>Date</code> objects according to the style value provided.</TD>
Configures Gson to to serialize <code>Date</code> objects according to the style value provided.</TD>
<CODE> <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/google/gson/GsonBuilder.html#setDateFormat(java.lang.String)">setDateFormat</A></B>(<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> pattern)</CODE>
<BR>
Configures Gson to serialize <code>Date</code> objects according to the pattern provided.</TD>
<CODE> <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/google/gson/GsonBuilder.html#setExclusionStrategies(com.google.gson.ExclusionStrategy...)">setExclusionStrategies</A></B>(<AHREF="../../../com/google/gson/ExclusionStrategy.html"title="interface in com.google.gson">ExclusionStrategy</A>... strategies)</CODE>
<BR>
Configures Gson to apply a set of exclusion strategies during both serialization and
<CODE> <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/google/gson/GsonBuilder.html#setFieldNamingPolicy(com.google.gson.FieldNamingPolicy)">setFieldNamingPolicy</A></B>(<AHREF="../../../com/google/gson/FieldNamingPolicy.html"title="enum in com.google.gson">FieldNamingPolicy</A> namingConvention)</CODE>
<BR>
Configures Gson to apply a specific naming policy to an object's field during serialization
<CODE> <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/google/gson/GsonBuilder.html#setFieldNamingStrategy(com.google.gson.FieldNamingStrategy)">setFieldNamingStrategy</A></B>(<AHREF="../../../com/google/gson/FieldNamingStrategy.html"title="interface in com.google.gson">FieldNamingStrategy</A> fieldNamingStrategy)</CODE>
<BR>
Configures Gson to apply a specific naming policy strategy to an object's field during
<CODE> <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/google/gson/GsonBuilder.html#setLongSerializationPolicy(com.google.gson.LongSerializationPolicy)">setLongSerializationPolicy</A></B>(<AHREF="../../../com/google/gson/LongSerializationPolicy.html"title="enum in com.google.gson">LongSerializationPolicy</A> serializationPolicy)</CODE>
<BR>
Configures Gson to apply a specific serialization policy for <code>Long</code> and <code>long</code>
<THALIGN="left"><B>Methods inherited from class java.lang.<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TRBGCOLOR="white"CLASS="TableRowColor">
<TD><CODE><AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()"title="class or interface in java.lang">clone</A>, <AHREF="http://docs.oracle.com/javase/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>, <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()"title="class or interface in java.lang">finalize</A>, <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()"title="class or interface in java.lang">getClass</A>, <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()"title="class or interface in java.lang">hashCode</A>, <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()"title="class or interface in java.lang">notify</A>, <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()"title="class or interface in java.lang">notifyAll</A>, <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()"title="class or interface in java.lang">toString</A>, <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()"title="class or interface in java.lang">wait</A>, <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)"title="class or interface in java.lang">wait</A>, <AHREF="http://docs.oracle.com/javase/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>
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>setVersion</B>(double ignoreVersionsAfter)</PRE>
<DL>
<DD>Configures Gson to enable versioning support.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ignoreVersionsAfter</CODE> - any field or type marked with a version higher than this value
are ignored during serialization or deserialization.
<DT><B>Returns:</B><DD>a reference to this <code>GsonBuilder</code> object to fulfill the "Builder" pattern</DL>
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>excludeFieldsWithModifiers</B>(int... modifiers)</PRE>
<DL>
<DD>Configures Gson to excludes all class fields that have the specified modifiers. By default,
<DT><B>Parameters:</B><DD><CODE>modifiers</CODE> - the field modifiers. You must use the modifiers specified in the
<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/reflect/Modifier.html?is-external=true"title="class or interface in java.lang.reflect"><CODE>Modifier</CODE></A> class. For example,
<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/reflect/Modifier.html?is-external=true#TRANSIENT"title="class or interface in java.lang.reflect"><CODE>Modifier.TRANSIENT</CODE></A>,
<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/reflect/Modifier.html?is-external=true#STATIC"title="class or interface in java.lang.reflect"><CODE>Modifier.STATIC</CODE></A>.
<DT><B>Returns:</B><DD>a reference to this <code>GsonBuilder</code> object to fulfill the "Builder" pattern</DL>
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>excludeFieldsWithoutExposeAnnotation</B>()</PRE>
<DL>
<DD>Configures Gson to exclude all fields from consideration for serialization or deserialization
that do not have the <AHREF="../../../com/google/gson/annotations/Expose.html"title="annotation in com.google.gson.annotations"><CODE>Expose</CODE></A> annotation.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a reference to this <code>GsonBuilder</code> object to fulfill the "Builder" pattern</DL>
</DD>
</DL>
<HR>
<ANAME="serializeNulls()"><!----></A><H3>
serializeNulls</H3>
<PRE>
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>serializeNulls</B>()</PRE>
<DL>
<DD>Configure Gson to serialize null fields. By default, Gson omits all fields that are null
during serialization.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a reference to this <code>GsonBuilder</code> object to fulfill the "Builder" pattern<DT><B>Since:</B></DT>
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>enableComplexMapKeySerialization</B>()</PRE>
<DL>
<DD>Enabling this feature will only change the serialized form if the map key is
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>setLongSerializationPolicy</B>(<AHREF="../../../com/google/gson/LongSerializationPolicy.html"title="enum in com.google.gson">LongSerializationPolicy</A> serializationPolicy)</PRE>
<DL>
<DD>Configures Gson to apply a specific serialization policy for <code>Long</code> and <code>long</code>
objects.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>serializationPolicy</CODE> - the particular policy to use for serializing longs.
<DT><B>Returns:</B><DD>a reference to this <code>GsonBuilder</code> object to fulfill the "Builder" pattern<DT><B>Since:</B></DT>
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>setFieldNamingPolicy</B>(<AHREF="../../../com/google/gson/FieldNamingPolicy.html"title="enum in com.google.gson">FieldNamingPolicy</A> namingConvention)</PRE>
<DL>
<DD>Configures Gson to apply a specific naming policy to an object's field during serialization
and deserialization.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>namingConvention</CODE> - the JSON field naming convention to use for serialization and
deserialization.
<DT><B>Returns:</B><DD>a reference to this <code>GsonBuilder</code> object to fulfill the "Builder" pattern</DL>
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>setFieldNamingStrategy</B>(<AHREF="../../../com/google/gson/FieldNamingStrategy.html"title="interface in com.google.gson">FieldNamingStrategy</A> fieldNamingStrategy)</PRE>
<DL>
<DD>Configures Gson to apply a specific naming policy strategy to an object's field during
serialization and deserialization.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fieldNamingStrategy</CODE> - the actual naming strategy to apply to the fields
<DT><B>Returns:</B><DD>a reference to this <code>GsonBuilder</code> object to fulfill the "Builder" pattern<DT><B>Since:</B></DT>
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>setExclusionStrategies</B>(<AHREF="../../../com/google/gson/ExclusionStrategy.html"title="interface in com.google.gson">ExclusionStrategy</A>... strategies)</PRE>
<DL>
<DD>Configures Gson to apply a set of exclusion strategies during both serialization and
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>addSerializationExclusionStrategy</B>(<AHREF="../../../com/google/gson/ExclusionStrategy.html"title="interface in com.google.gson">ExclusionStrategy</A> strategy)</PRE>
<DL>
<DD>Configures Gson to apply the passed in exclusion strategy during serialization.
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>addDeserializationExclusionStrategy</B>(<AHREF="../../../com/google/gson/ExclusionStrategy.html"title="interface in com.google.gson">ExclusionStrategy</A> strategy)</PRE>
<DL>
<DD>Configures Gson to apply the passed in exclusion strategy during deserialization.
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>setDateFormat</B>(<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> pattern)</PRE>
<DL>
<DD>Configures Gson to serialize <code>Date</code> objects according to the pattern provided. You can
call this method or <AHREF="../../../com/google/gson/GsonBuilder.html#setDateFormat(int)"><CODE>setDateFormat(int)</CODE></A> multiple times, but only the last invocation
<p>The date format will be used to serialize and deserialize <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Date.html?is-external=true"title="class or interface in java.util"><CODE>Date</CODE></A>, <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/Timestamp.html?is-external=true"title="class or interface in java.sql"><CODE>Timestamp</CODE></A> and <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/Date.html?is-external=true"title="class or interface in java.sql"><CODE>Date</CODE></A>.
class. See the documentation in <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/text/SimpleDateFormat.html?is-external=true"title="class or interface in java.text"><CODE>SimpleDateFormat</CODE></A> for more information on
valid date and time patterns.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pattern</CODE> - the pattern that dates will be serialized/deserialized to/from
<DT><B>Returns:</B><DD>a reference to this <code>GsonBuilder</code> object to fulfill the "Builder" pattern<DT><B>Since:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<ANAME="setDateFormat(int)"><!----></A><H3>
setDateFormat</H3>
<PRE>
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>setDateFormat</B>(int style)</PRE>
<DL>
<DD>Configures Gson to to serialize <code>Date</code> objects according to the style value provided.
You can call this method or <AHREF="../../../com/google/gson/GsonBuilder.html#setDateFormat(java.lang.String)"><CODE>setDateFormat(String)</CODE></A> multiple times, but only the last
<code>DateFormat</code> class. See the documentation in <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/text/DateFormat.html?is-external=true"title="class or interface in java.text"><CODE>DateFormat</CODE></A> for more
information on the valid style constants.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>style</CODE> - the predefined date style that date objects will be serialized/deserialized
to/from
<DT><B>Returns:</B><DD>a reference to this <code>GsonBuilder</code> object to fulfill the "Builder" pattern<DT><B>Since:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<ANAME="setDateFormat(int, int)"><!----></A><H3>
setDateFormat</H3>
<PRE>
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>setDateFormat</B>(int dateStyle,
int timeStyle)</PRE>
<DL>
<DD>Configures Gson to to serialize <code>Date</code> objects according to the style value provided.
You can call this method or <AHREF="../../../com/google/gson/GsonBuilder.html#setDateFormat(java.lang.String)"><CODE>setDateFormat(String)</CODE></A> multiple times, but only the last
<code>DateFormat</code> class. See the documentation in <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/text/DateFormat.html?is-external=true"title="class or interface in java.text"><CODE>DateFormat</CODE></A> for more
information on the valid style constants.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dateStyle</CODE> - the predefined date style that date objects will be serialized/deserialized
to/from<DD><CODE>timeStyle</CODE> - the predefined style for the time portion of the date objects
<DT><B>Returns:</B><DD>a reference to this <code>GsonBuilder</code> object to fulfill the "Builder" pattern<DT><B>Since:</B></DT>
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>registerTypeAdapter</B>(<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/reflect/Type.html?is-external=true"title="class or interface in java.lang.reflect">Type</A> type,
<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> typeAdapter)</PRE>
<DL>
<DD>Configures Gson for custom serialization or deserialization. This method combines the
registration of an <AHREF="../../../com/google/gson/TypeAdapter.html"title="class in com.google.gson"><CODE>TypeAdapter</CODE></A>, <AHREF="../../../com/google/gson/InstanceCreator.html"title="interface in com.google.gson"><CODE>InstanceCreator</CODE></A>, <AHREF="../../../com/google/gson/JsonSerializer.html"title="interface in com.google.gson"><CODE>JsonSerializer</CODE></A>, and a
<AHREF="../../../com/google/gson/JsonDeserializer.html"title="interface in com.google.gson"><CODE>JsonDeserializer</CODE></A>. It is best used when a single object <code>typeAdapter</code> implements
types! For example, applications registering <code>boolean.class</code> should also register <code>Boolean.class</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - the type definition for the type adapter being registered<DD><CODE>typeAdapter</CODE> - This object must implement at least one of the <AHREF="../../../com/google/gson/TypeAdapter.html"title="class in com.google.gson"><CODE>TypeAdapter</CODE></A>,
<AHREF="../../../com/google/gson/InstanceCreator.html"title="interface in com.google.gson"><CODE>InstanceCreator</CODE></A>, <AHREF="../../../com/google/gson/JsonSerializer.html"title="interface in com.google.gson"><CODE>JsonSerializer</CODE></A>, and a <AHREF="../../../com/google/gson/JsonDeserializer.html"title="interface in com.google.gson"><CODE>JsonDeserializer</CODE></A> interfaces.
<DT><B>Returns:</B><DD>a reference to this <code>GsonBuilder</code> object to fulfill the "Builder" pattern</DL>
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>registerTypeAdapterFactory</B>(<AHREF="../../../com/google/gson/TypeAdapterFactory.html"title="interface in com.google.gson">TypeAdapterFactory</A> factory)</PRE>
<DL>
<DD>Register a factory for type adapters. Registering a factory is useful when the type
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>registerTypeHierarchyAdapter</B>(<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Class.html?is-external=true"title="class or interface in java.lang">Class</A><?> baseType,
<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A> typeAdapter)</PRE>
<DL>
<DD>Configures Gson for custom serialization or deserialization for an inheritance type hierarchy.
This method combines the registration of a <AHREF="../../../com/google/gson/TypeAdapter.html"title="class in com.google.gson"><CODE>TypeAdapter</CODE></A>, <AHREF="../../../com/google/gson/JsonSerializer.html"title="interface in com.google.gson"><CODE>JsonSerializer</CODE></A> and
a <AHREF="../../../com/google/gson/JsonDeserializer.html"title="interface in com.google.gson"><CODE>JsonDeserializer</CODE></A>. If a type adapter was previously registered for the specified
the type hierarchy, it will be invoked instead of the one registered for the type hierarchy.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>baseType</CODE> - the class definition for the type adapter being registered for the base class
or interface<DD><CODE>typeAdapter</CODE> - This object must implement at least one of <AHREF="../../../com/google/gson/TypeAdapter.html"title="class in com.google.gson"><CODE>TypeAdapter</CODE></A>,
<AHREF="../../../com/google/gson/JsonSerializer.html"title="interface in com.google.gson"><CODE>JsonSerializer</CODE></A> or <AHREF="../../../com/google/gson/JsonDeserializer.html"title="interface in com.google.gson"><CODE>JsonDeserializer</CODE></A> interfaces.
<DT><B>Returns:</B><DD>a reference to this <code>GsonBuilder</code> object to fulfill the "Builder" pattern<DT><B>Since:</B></DT>
public <AHREF="../../../com/google/gson/GsonBuilder.html"title="class in com.google.gson">GsonBuilder</A><B>serializeSpecialFloatingPointValues</B>()</PRE>
<DL>
<DD>Section 2.4 of <ahref="http://www.ietf.org/rfc/rfc4627.txt">JSON specification</a> disallows
strictly compliant JSON. Hence, if it encounters a float value <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Float.html?is-external=true#NaN"title="class or interface in java.lang"><CODE>Float.NaN</CODE></A>,
<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Float.html?is-external=true#POSITIVE_INFINITY"title="class or interface in java.lang"><CODE>Float.POSITIVE_INFINITY</CODE></A>, <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Float.html?is-external=true#NEGATIVE_INFINITY"title="class or interface in java.lang"><CODE>Float.NEGATIVE_INFINITY</CODE></A>, or a double value
<AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Double.html?is-external=true#NaN"title="class or interface in java.lang"><CODE>Double.NaN</CODE></A>, <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Double.html?is-external=true#POSITIVE_INFINITY"title="class or interface in java.lang"><CODE>Double.POSITIVE_INFINITY</CODE></A>, <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Double.html?is-external=true#NEGATIVE_INFINITY"title="class or interface in java.lang"><CODE>Double.NEGATIVE_INFINITY</CODE></A>, it
will throw an <AHREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true"title="class or interface in java.lang"><CODE>IllegalArgumentException</CODE></A>. This method provides a way to override the
<DT><B>Returns:</B><DD>a reference to this <code>GsonBuilder</code> object to fulfill the "Builder" pattern<DT><B>Since:</B></DT>
<DD>1.3</DD>
</DL>
</DD>
</DL>
<HR>
<ANAME="create()"><!----></A><H3>
create</H3>
<PRE>
public <AHREF="../../../com/google/gson/Gson.html"title="class in com.google.gson">Gson</A><B>create</B>()</PRE>
<DL>
<DD>Creates a <AHREF="../../../com/google/gson/Gson.html"title="class in com.google.gson"><CODE>Gson</CODE></A> instance based on the current configuration. This method is free of
side-effects to this <code>GsonBuilder</code> instance and hence can be called multiple times.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>an instance of Gson configured with the options currently set in this builder</DL>