From 08aa92dc22928a3efc9b10aa7d14ac854627c85a Mon Sep 17 00:00:00 2001 From: Marcos Candeia Date: Sat, 19 Oct 2024 18:40:50 -0300 Subject: [PATCH] Support bigint serialization Signed-off-by: Marcos Candeia --- src/actors/proxyutil.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/actors/proxyutil.ts b/src/actors/proxyutil.ts index 61ee3ef..d789488 100644 --- a/src/actors/proxyutil.ts +++ b/src/actors/proxyutil.ts @@ -211,9 +211,13 @@ export const createHttpInvoker = < ? { ["x-deno-deployment-id"]: actorsServer.deploymentId } : {}, }, - body: JSON.stringify({ - args: methodArgs ?? [], - }), + body: JSON.stringify( + { + args: methodArgs ?? [], + }, + (_key, value) => + typeof value === "bigint" ? value.toString() : value, // return everything else unchanged + ), }, ); if (!resp.ok) {