tsrpc
tsrpc copied to clipboard
bigint不能解析的问题
https://github.com/k8w/tsrpc/blob/a4f492c194e66a38612e14bc792c1efd04694f07/src/server/base/ApiCall.ts#L199 能否改为
return { isSucc: true, output: type === 'json' ? json : JSON.stringify(
json,
(key, value) => (typeof value === 'bigint' ? value.toString() : value)
) };
不知道这样解决合不合理
感谢建议,JSON 确实还没有支持 bigint,可以考虑用二进制传输。 后续会优化支持~