diff options
author | Jake Wharton <jakewharton@gmail.com> | 2015-09-26 19:26:16 -0400 |
---|---|---|
committer | Jake Wharton <jakewharton@gmail.com> | 2015-09-26 19:26:16 -0400 |
commit | b82e1b09319550bd7b377e5c766f104721e777f2 (patch) | |
tree | 93c5eac9ade1de350b8643e80c1fbd64fe333a2a | |
parent | 31f80d86590e523af1360a1a3d0f330989434286 (diff) | |
parent | e81f3eba2731bac5b7b5a50e7218f9847a170d83 (diff) | |
download | android_external_gson-b82e1b09319550bd7b377e5c766f104721e777f2.tar.gz android_external_gson-b82e1b09319550bd7b377e5c766f104721e777f2.tar.bz2 android_external_gson-b82e1b09319550bd7b377e5c766f104721e777f2.zip |
Merge pull request #704 from google/jw/new-json-writer
Expose newJsonWriter wrapper instead of just options.
-rw-r--r-- | gson/src/main/java/com/google/gson/Gson.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gson/src/main/java/com/google/gson/Gson.java b/gson/src/main/java/com/google/gson/Gson.java index 83251571..d3b172a8 100644 --- a/gson/src/main/java/com/google/gson/Gson.java +++ b/gson/src/main/java/com/google/gson/Gson.java @@ -247,11 +247,6 @@ 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; @@ -648,10 +643,9 @@ public final class Gson { } /** - * Returns a new JSON writer configured for this GSON and with the non-execute - * prefix if that is configured. + * Returns a new JSON writer configured for the settings on this Gson instance. */ - private JsonWriter newJsonWriter(Writer writer) throws IOException { + public JsonWriter newJsonWriter(Writer writer) throws IOException { if (generateNonExecutableJson) { writer.write(JSON_NON_EXECUTABLE_PREFIX); } |