We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e2208dd + a713fe2 commit 37f717dCopy full SHA for 37f717d
1 file changed
Helpers/ClientDataJsonHelper.cs
@@ -155,17 +155,27 @@ private static List<ClientDataJson> GetListFromJson(StreamReader reader)
155
{
156
List<ClientDataJson> listJson = new List<ClientDataJson>();
157
string jsonString = reader.ReadToEnd();
158
-
159
- if (string.IsNullOrEmpty(jsonString))
+ try
160
161
- listJson = [];
+ if (string.IsNullOrEmpty(jsonString))
+ {
162
+ return listJson;
163
+ }
164
+ else
165
166
+ listJson = JsonSerializer.Deserialize<List<ClientDataJson>>(jsonString);
167
168
169
}
- else
170
+ catch
171
- listJson = JsonSerializer.Deserialize<List<ClientDataJson>>(jsonString);
172
+ Log.Warn($"Error of reading list of Client Data; Value: {jsonString}");
173
174
175
+
176
177
178
- return listJson;
179
180
181
0 commit comments