質問編集履歴

3

質問削除の取り消し

2018/08/31 01:55

投稿

退会済みユーザー
test CHANGED
@@ -1 +1 @@
1
- @@@@@@@削除しまし
1
+ [Unity]keyがidになるようなjsonを作り
test CHANGED
@@ -1 +1,61 @@
1
+ 現在UnityでfirebaseのRealtime Databaseをつかってグループ作成機能を作りたいと考えています。
2
+
3
+ そこでgroupが持つusersのkeyとしてuser_idを入れたいのですが、JsonUtilityを使うとkeyが変数名になってしまうため思うようなjsonが作れません。どのようにjsonを作成すればいいでしょうか?
4
+
5
+ こんな感じのイメージです。
6
+
7
+ ```json
8
+
9
+ // An index to track Ada's memberships
10
+
11
+ {
12
+
13
+ "users": {
14
+
15
+ "alovelace": {
16
+
17
+ "name": "Ada Lovelace",
18
+
19
+ // Index Ada's groups in her profile
20
+
21
+ "groups": {
22
+
1
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@削除しました
23
+ // the value here doesn't matter, just that the key exists
24
+
25
+ "techpioneers": true,
26
+
27
+ "womentechmakers": true
28
+
29
+ }
30
+
31
+ },
32
+
33
+ ...
34
+
35
+ },
36
+
37
+ "groups": {
38
+
39
+ "techpioneers": {
40
+
41
+ "name": "Historical Tech Pioneers",
42
+
43
+ "members": {
44
+
45
+ "alovelace": true,
46
+
47
+ "ghopper": true,
48
+
49
+ "eclarke": true
50
+
51
+ }
52
+
53
+ },
54
+
55
+ ...
56
+
57
+ }
58
+
59
+ }
60
+
61
+ ```

2

削除しました

2018/08/31 01:55

投稿

退会済みユーザー
test CHANGED
@@ -1 +1 @@
1
- [Unity]keyがidになるようなjsonを作り
1
+ @@@@@@@削除しまし
test CHANGED
@@ -1,63 +1 @@
1
- 現在UnityでfirebaseのRealtime Databaseをつかってグループ作成機能を作りたいと考えています。
2
-
3
- そこでgroupが持つusersのkeyとしてuser_idを入れたいのですが、JsonUtilityを使うとkeyが変数名になってしまうため思うようなjsonが作れません。どのようにjsonを作成すればいいでしょうか?
4
-
5
-
6
-
7
- こんな感じのイメージです。
8
-
9
- ```json
10
-
11
- // An index to track Ada's memberships
12
-
13
- {
14
-
15
- "users": {
16
-
17
- "alovelace": {
18
-
19
- "name": "Ada Lovelace",
20
-
21
- // Index Ada's groups in her profile
22
-
23
- "groups": {
24
-
25
- // the value here doesn't matter, just that the key exists
1
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@削除しました
26
-
27
- "techpioneers": true,
28
-
29
- "womentechmakers": true
30
-
31
- }
32
-
33
- },
34
-
35
- ...
36
-
37
- },
38
-
39
- "groups": {
40
-
41
- "techpioneers": {
42
-
43
- "name": "Historical Tech Pioneers",
44
-
45
- "members": {
46
-
47
- "alovelace": true,
48
-
49
- "ghopper": true,
50
-
51
- "eclarke": true
52
-
53
- }
54
-
55
- },
56
-
57
- ...
58
-
59
- }
60
-
61
- }
62
-
63
- ```

1

例示

2018/08/28 01:46

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -1,3 +1,63 @@
1
1
  現在UnityでfirebaseのRealtime Databaseをつかってグループ作成機能を作りたいと考えています。
2
2
 
3
3
  そこでgroupが持つusersのkeyとしてuser_idを入れたいのですが、JsonUtilityを使うとkeyが変数名になってしまうため思うようなjsonが作れません。どのようにjsonを作成すればいいでしょうか?
4
+
5
+
6
+
7
+ こんな感じのイメージです。
8
+
9
+ ```json
10
+
11
+ // An index to track Ada's memberships
12
+
13
+ {
14
+
15
+ "users": {
16
+
17
+ "alovelace": {
18
+
19
+ "name": "Ada Lovelace",
20
+
21
+ // Index Ada's groups in her profile
22
+
23
+ "groups": {
24
+
25
+ // the value here doesn't matter, just that the key exists
26
+
27
+ "techpioneers": true,
28
+
29
+ "womentechmakers": true
30
+
31
+ }
32
+
33
+ },
34
+
35
+ ...
36
+
37
+ },
38
+
39
+ "groups": {
40
+
41
+ "techpioneers": {
42
+
43
+ "name": "Historical Tech Pioneers",
44
+
45
+ "members": {
46
+
47
+ "alovelace": true,
48
+
49
+ "ghopper": true,
50
+
51
+ "eclarke": true
52
+
53
+ }
54
+
55
+ },
56
+
57
+ ...
58
+
59
+ }
60
+
61
+ }
62
+
63
+ ```