Closed sebastianst closed 2 years ago
What might work even better is a custom property decorator like
function jsonBigIntMember(): PropertyDecorator {
return jsonMember({
deserializer: (json) => (json == null ? json : BigInt(json)),
serializer: (value) => (value == null ? value : value.toString()),
});
}
reference: https://github.com/JohnWeisz/TypedJSON/issues/156#issuecomment-768326459
We can register our custom JSON serialization of
bigint
directly with TypedJSON's type mapping. ABI handling can probably also be set per type.