Skip to content

Commit

Permalink
Fix JsonPrinter Int64 Type
Browse files Browse the repository at this point in the history
  • Loading branch information
barisyild authored Jan 3, 2025
1 parent bdae3e7 commit b452eed
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions std/haxe/format/JsonPrinter.hx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ class JsonPrinter {
v = replacer(k, v);
switch (Type.typeof(v)) {
case TUnknown:
add('"???"');
#if hl
if(haxe.Int64.isInt64(v))
add(haxe.Int64.toStr(v));
else
#end
add('"???"');
case TObject:
objString(v);
case TInt:
Expand Down Expand Up @@ -125,7 +130,9 @@ class JsonPrinter {
} else if (c == Date) {
var v:Date = v;
quote(v.toString());
} else
} else if(haxe.Int64.isInt64(v))
add(haxe.Int64.toStr(v));
else
classString(v);
case TEnum(_):
var i = Type.enumIndex(v);
Expand Down

0 comments on commit b452eed

Please sign in to comment.