mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-23 08:07:54 -05:00
Fixed a JSON parser issue causing event data to be parsed wrong!
This commit is contained in:
parent
06269e95fd
commit
29c22a422f
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue