質問編集履歴

3

回答を反映しました。

2021/01/23 11:03

投稿

yuyu213
yuyu213

スコア17

test CHANGED
File without changes
test CHANGED
@@ -158,12 +158,12 @@
158
158
 
159
159
  public class PostalCodeService {
160
160
 
161
- Response response;
162
-
163
-
164
-
165
161
  public static void main(String[] args) throws JsonParseException, JsonMappingException, IOException {
166
162
 
163
+ Response response = new Response();
164
+
165
+
166
+
167
167
  ObjectMapper mapper = new ObjectMapper();
168
168
 
169
169
  mapper.registerModule(new JavaTimeModule());
@@ -176,7 +176,7 @@
176
176
 
177
177
 
178
178
 
179
- PostalCodeService hoge = mapper.readValue(url, PostalCodeService.class);
179
+ response = mapper.readValue(url, Response.class);
180
180
 
181
181
  // System.out.println(mapper.readValue(url, PostalCodeService.class));
182
182
 
@@ -200,11 +200,9 @@
200
200
 
201
201
  public class Response {
202
202
 
203
- Location LocationList;
203
+ public List<Location> location;
204
-
204
+
205
- }
205
+ }
206
-
207
-
208
206
 
209
207
  ```
210
208
 

2

初心者アイコンの追加

2021/01/23 11:03

投稿

yuyu213
yuyu213

スコア17

test CHANGED
File without changes
test CHANGED
@@ -256,6 +256,4 @@
256
256
 
257
257
  }
258
258
 
259
-
260
-
261
- ```
259
+ ```

1

誤字

2021/01/23 09:01

投稿

yuyu213
yuyu213

スコア17

test CHANGED
File without changes
test CHANGED
@@ -186,14 +186,6 @@
186
186
 
187
187
  ```
188
188
 
189
- PostalCodeService.java
190
-
191
- ```Java
192
-
193
-
194
-
195
- ```
196
-
197
189
  Response.java
198
190
 
199
191
  ```Java