@@ -83,11 +83,35 @@ static Builder newBuilder() {
83
83
84
84
/**
85
85
* Return the JsonType used to read and write json for the given class.
86
+ *
87
+ * <h3>Using Object.class</h3>
88
+ * <p>
89
+ * We can use <code>type(Object.class)</code> when we don't know the specific type that is being
90
+ * written toJson or read fromJson.
91
+ * <p>
92
+ * When using <code>Object.class</code> and writing <code>toJson()</code> then the underlying JsonAdapter
93
+ * is determined dynamically based on the type of the object value passed in.
94
+ * <p>
95
+ * When using <code>Object.class</code> and reading <code>fromJson()</code> then the java types used in
96
+ * the result are determined dynamically based on the JSON types being read and the resulting java types
97
+ * are ArrayList, LinkedHashMap, String, boolean, and double.
86
98
*/
87
99
<T > JsonType <T > type (Class <T > cls );
88
100
89
101
/**
90
102
* Return the JsonType used to read and write json for the given type.
103
+ *
104
+ * <h3>Using Object.class</h3>
105
+ * <p>
106
+ * We can use <code>type(Object.class)</code> when we don't know the specific type that is being
107
+ * written toJson or read fromJson.
108
+ * <p>
109
+ * When using <code>Object.class</code> and writing <code>toJson()</code> then the underlying JsonAdapter
110
+ * is determined dynamically based on the type of the object value passed in.
111
+ * <p>
112
+ * When using <code>Object.class</code> and reading <code>fromJson()</code> then the java types used in
113
+ * the result are determined dynamically based on the JSON types being read and the resulting java types
114
+ * are ArrayList, LinkedHashMap, String, boolean, and double.
91
115
*/
92
116
<T > JsonType <T > type (Type type );
93
117
0 commit comments