Expose serializeNulls with an accessor.
Useful for frameworks that build on Gson.
This commit is contained in:
parent
2cac11b449
commit
ff2c8f8e8b
@ -246,6 +246,11 @@ public final class Gson {
|
||||
this.factories = Collections.unmodifiableList(factories);
|
||||
}
|
||||
|
||||
/** Returns true if this Gson instance writes fields with null values. */
|
||||
public boolean serializeNulls() {
|
||||
return serializeNulls;
|
||||
}
|
||||
|
||||
private TypeAdapter<Number> doubleAdapter(boolean serializeSpecialFloatingPointValues) {
|
||||
if (serializeSpecialFloatingPointValues) {
|
||||
return TypeAdapters.DOUBLE;
|
||||
|
Loading…
Reference in New Issue
Block a user