cleanup
This commit is contained in:
@@ -71,7 +71,7 @@ final class DataRepository {
|
||||
Address ad = null;
|
||||
while (jsonReader.hasNext()) {
|
||||
String name = jsonReader.nextName();
|
||||
System.out.println(String.format("Load Account %s", name));
|
||||
String.format("Load Account %s", name);
|
||||
switch (name) {
|
||||
case "Account":
|
||||
jsonReader.beginObject();
|
||||
@@ -88,14 +88,14 @@ final class DataRepository {
|
||||
break;
|
||||
case "Address":
|
||||
jsonReader.beginObject();
|
||||
System.out.println(jsonReader.nextName());
|
||||
jsonReader.nextName();
|
||||
ad = new Address();
|
||||
ad.setStreet(jsonReader.nextString());
|
||||
System.out.println(jsonReader.nextName());
|
||||
jsonReader.nextName();
|
||||
ad.setCity(jsonReader.nextString());
|
||||
System.out.println(jsonReader.nextName());
|
||||
jsonReader.nextName();
|
||||
ad.setState(jsonReader.nextString());
|
||||
System.out.println(jsonReader.nextName());
|
||||
jsonReader.nextName();
|
||||
ad.setZip(jsonReader.nextString());
|
||||
jsonReader.endObject();
|
||||
jsonReader.endObject();
|
||||
|
||||
Reference in New Issue
Block a user