@@ -88,16 +88,18 @@ void main() {
88
88
context: LDContextBuilder ().kind ('user' , 'user-key' ).build (),
89
89
key: 'my-key' );
90
90
91
- final json = jsonEncode (CustomEventSerialization .toJson (event));
91
+ final json = jsonEncode (CustomEventSerialization .toJson (event,
92
+ allAttributesPrivate: false , globalPrivateAttributes: {}));
92
93
93
94
final jsonAsLdValue = LDValueSerialization .fromJson (jsonDecode (json));
94
95
95
96
final expectedLdValue = LDValueSerialization .fromJson (jsonDecode ('{'
96
97
'"kind": "custom",'
97
98
'"key": "my-key",'
98
99
'"creationDate": 0,'
99
- '"contextKeys": {'
100
- '"user": "user-key"'
100
+ '"context": {'
101
+ '"kind": "user",'
102
+ '"key": "user-key"'
101
103
'}'
102
104
'}' ));
103
105
@@ -111,7 +113,8 @@ void main() {
111
113
context: LDContextBuilder ().kind ('user' , 'user-key' ).build (),
112
114
key: 'my-key' );
113
115
114
- final json = jsonEncode (CustomEventSerialization .toJson (event));
116
+ final json = jsonEncode (CustomEventSerialization .toJson (event,
117
+ allAttributesPrivate: false , globalPrivateAttributes: {}));
115
118
116
119
final jsonAsLdValue = LDValueSerialization .fromJson (jsonDecode (json));
117
120
@@ -120,8 +123,9 @@ void main() {
120
123
'"metricValue": 100,'
121
124
'"key": "my-key",'
122
125
'"creationDate": 0,'
123
- '"contextKeys": {'
124
- '"user": "user-key"'
126
+ '"context": {'
127
+ '"kind": "user",'
128
+ '"key": "user-key"'
125
129
'}'
126
130
'}' ));
127
131
@@ -135,7 +139,8 @@ void main() {
135
139
context: LDContextBuilder ().kind ('user' , 'user-key' ).build (),
136
140
key: 'my-key' );
137
141
138
- final json = jsonEncode (CustomEventSerialization .toJson (event));
142
+ final json = jsonEncode (CustomEventSerialization .toJson (event,
143
+ allAttributesPrivate: false , globalPrivateAttributes: {}));
139
144
140
145
final jsonAsLdValue = LDValueSerialization .fromJson (jsonDecode (json));
141
146
@@ -144,8 +149,9 @@ void main() {
144
149
'"key": "my-key",'
145
150
'"data": {"test": "value"},'
146
151
'"creationDate": 0,'
147
- '"contextKeys": {'
148
- '"user": "user-key"'
152
+ '"context": {'
153
+ '"kind": "user",'
154
+ '"key": "user-key"'
149
155
'}'
150
156
'}' ));
151
157
@@ -160,7 +166,8 @@ void main() {
160
166
context: LDContextBuilder ().kind ('user' , 'user-key' ).build (),
161
167
key: 'my-key' );
162
168
163
- final json = jsonEncode (CustomEventSerialization .toJson (event));
169
+ final json = jsonEncode (CustomEventSerialization .toJson (event,
170
+ allAttributesPrivate: false , globalPrivateAttributes: {}));
164
171
165
172
final jsonAsLdValue = LDValueSerialization .fromJson (jsonDecode (json));
166
173
@@ -170,8 +177,9 @@ void main() {
170
177
'"data": {"test": "value"},'
171
178
'"metricValue": 100,'
172
179
'"creationDate": 0,'
173
- '"contextKeys": {'
174
- '"user": "user-key"'
180
+ '"context": {'
181
+ '"kind": "user",'
182
+ '"key": "user-key"'
175
183
'}'
176
184
'}' ));
177
185
0 commit comments