Repository navigation
Adds support for serializing bigints. - #454
Conversation
|
|
I went with serializing bigints as an object with a type and value, but I'm open to other ideas for how to serialize them so they are JSON compatible. I don't know why I needed to change the type of `setInCopy`, but the original type definition appears to have been incorrect. I largely don't understand what most of the properties in `parseProps` are for, so I just tried to copy other thinsg in a way that seemed reasonable. In particular, `editable` I set to `!forceReadonly` but this was really just a guess on my part. I made a few changes to improve the type strictness of `JSONValue`. If these strictness increases are considered undesirable then everything except the addition of `JSONBigint` can be removed without causing problems.
|
Fixed PR to actually work. Tested with a dapp and I was able to successfully marshal Feedback definitely appreciated. While everything works and tests all pass, I am a small step up from a monkey smashing on a keyboard when it comes to understanding what I'm doing in this codebase. I think I have figured out enough that this PR should work, but someone more familiar should take a look at it to verify it is all reasonable. Of particular interest, the place that I'm converting from |
marvinhagemeister
left a comment
There was a problem hiding this comment.
Awesome, thanks a bunch for the PR 👍
I went with serializing bigints as an object with a type and value, but I'm open to other ideas for how to serialize them so they are JSON compatible.
I don't know why I needed to change the type of
setInCopy, but the original type definition appears to have been incorrect.I largely don't understand what most of the properties in
parsePropsare for, so I just tried to copy other parsers in a way that seemed reasonable. In particular,editableI set to!forceReadonlybut this was really just a guess on my part.I made a few changes to improve the type strictness of
JSONValue. If these strictness increases are considered undesirable then everything except the addition ofJSONBigintcan be removed without causing problems.Fixes #453