Fix wrong reference in Versioning Support example (#1482)

This commit is contained in:
Tomy Jaya 2019-03-07 16:26:22 +08:00 committed by inder123
parent bac26b8e42
commit ab0821c83e
1 changed files with 2 additions and 2 deletions

View File

@ -510,12 +510,12 @@ public class VersionedClass {
VersionedClass versionedObject = new VersionedClass();
Gson gson = new GsonBuilder().setVersion(1.0).create();
String jsonOutput = gson.toJson(someObject);
String jsonOutput = gson.toJson(versionedObject);
System.out.println(jsonOutput);
System.out.println();
gson = new Gson();
jsonOutput = gson.toJson(someObject);
jsonOutput = gson.toJson(versionedObject);
System.out.println(jsonOutput);
```