質問編集履歴

1

取り扱ったデータの追記

2018/01/10 08:31

投稿

icchie
icchie

スコア21

test CHANGED
File without changes
test CHANGED
@@ -12,45 +12,53 @@
12
12
 
13
13
  #エラー内容
14
14
 
15
- ####JSONリクエスト内容
15
+ ####取り扱うデータ
16
16
 
17
17
  ``
18
18
 
19
- 'name=nickname&grade=1&birthday=19990514&password=password&instrument=%e3%83%94%e3%82%a2%e3%83%8e(%e4%bb%ae)'
19
+ {
20
+
21
+ "name": "nickname",
22
+
23
+ "grade": "1",
24
+
25
+ "birthday": "19990514",
26
+
27
+ "instrument": "\u30D4\u30A2\u30CE(\u4EEE)",
28
+
29
+ "password": "password"
30
+
31
+ }
32
+
33
+ ``
34
+
35
+ ####サーバーのエラー内容
36
+
37
+
38
+
39
+ ``
40
+
41
+ Error occurred while parsing request parameters.
42
+
43
+ ``
44
+
45
+ ``
46
+
47
+ ActionDispatch::Http::Parameters::ParseError (822: unexpected token at 'user=%7b%22name%22%3a%22nickname%22%2c%22grade%22%3a%222%22%2c%22birthday%22%3a%2219990514%22%2c%22instrument%22%3a%22%5cu30D4%5cu30A2%5cu30CE(%5cu4EEE)%22%2c%22password%22%3a%22password%22%7d'):
20
48
 
21
49
  ``
22
50
 
23
51
 
24
52
 
25
- ####検証したjsonのエラー
26
-
27
53
  ``
28
54
 
29
- Error: Parse error on line 1:
30
-
31
- 'name=nickname&grade
32
-
33
- ^
34
-
35
- Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined'
55
+ vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.2/lib/action_dispatch/http/parameters.rb:107:in `parse_formatted_parameters'
36
56
 
37
57
  ``
38
58
 
39
59
 
40
60
 
41
- ####サーバーのエラー内容
42
61
 
43
- ``
44
-
45
- Started POST "/users" for 218.219.247.96 at 2018-01-08 14:11:03 +0900
46
-
47
- 5.1.2/lib/action_dispatch/http/parameters.rb:113:in `rescue in parse_formatted_parameters'
48
-
49
- Error occurred while parsing request parameters.
50
-
51
- ActionDispatch::Http::Parameters::ParseError (822: unexpected token at 'name=otonomori&grade=2&birthday=19990514&password=password&instrument=%e3%83%94%e3%82%a2%e3%83%8e(%e4%bb%ae)'):
52
-
53
- ``
54
62
 
55
63
 
56
64