Fixed a JSON parser issue causing event data to be parsed wrong!

This commit is contained in:
EliteMasterEric 2023-09-18 20:14:43 -04:00
parent 06269e95fd
commit 29c22a422f

View file

@ -64,7 +64,7 @@ class DataParse
return switch (json.value) return switch (json.value)
{ {
case JString(s): s; case JString(s): s;
case JNumber(n): n; case JNumber(n): Std.parseInt(n);
case JBool(b): b; case JBool(b): b;
case JNull: null; case JNull: null;
case JObject(fields): jsonFieldsToDynamicObject(fields); case JObject(fields): jsonFieldsToDynamicObject(fields);
@ -82,7 +82,7 @@ class DataParse
var result:Dynamic = {}; var result:Dynamic = {};
for (field in fields) for (field in fields)
{ {
Reflect.setField(result, field.name, field.value); Reflect.setField(result, field.name, jsonToDynamic(field.value));
} }
return result; return result;
} }