Created
December 19, 2013 07:01
-
-
Save Mekapiku/8035426 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ResponseData { | |
private List<Item> data; | |
// Getter, Setter 省略 | |
static class Item { | |
private Integer itemCode; | |
private String itemName; | |
private Integer itemPrice; | |
// Getter, Setter 省略 | |
} | |
} | |
Gson gson = new Gson(); | |
ResponseData res = gson.fromJson(new FileReader(“items.json”), ResponseData.class); | |
assertThat(res.getData().get(0).getItemCode(), is(91)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment