File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed
main/java/com/google/gson
test/java/com/google/gson Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -299,18 +299,31 @@ public GsonBuilder newBuilder() {
299299 return new GsonBuilder (this );
300300 }
301301
302- public Excluder excluder () {
303- return excluder ;
304- }
305-
302+ /**
303+ * Returns the field naming strategy used by this Gson instance.
304+ *
305+ * @see GsonBuilder#setFieldNamingStrategy(FieldNamingStrategy)
306+ */
306307 public FieldNamingStrategy fieldNamingStrategy () {
307308 return fieldNamingStrategy ;
308309 }
309310
311+ /**
312+ * Returns whether this Gson instance is serializing JSON object properties with
313+ * {@code null} values, or just omits them.
314+ *
315+ * @see GsonBuilder#serializeNulls()
316+ */
310317 public boolean serializeNulls () {
311318 return serializeNulls ;
312319 }
313320
321+ /**
322+ * Returns whether this Gson instance produces JSON output which is
323+ * HTML-safe, that means all HTML characters are escaped.
324+ *
325+ * @see GsonBuilder#disableHtmlEscaping()
326+ */
314327 public boolean htmlSafe () {
315328 return htmlSafe ;
316329 }
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ public void testOverridesDefaultExcluder() {
5555 new ArrayList <TypeAdapterFactory >(), new ArrayList <TypeAdapterFactory >(),
5656 CUSTOM_OBJECT_TO_NUMBER_STRATEGY , CUSTOM_NUMBER_TO_NUMBER_STRATEGY );
5757
58- assertEquals (CUSTOM_EXCLUDER , gson .excluder () );
58+ assertEquals (CUSTOM_EXCLUDER , gson .excluder );
5959 assertEquals (CUSTOM_FIELD_NAMING_STRATEGY , gson .fieldNamingStrategy ());
6060 assertEquals (true , gson .serializeNulls ());
6161 assertEquals (false , gson .htmlSafe ());
You can’t perform that action at this time.
0 commit comments