Implement `replacer` equivalent in `stringify`
Zulu-Inuoe opened this issue · 2 comments
Zulu-Inuoe commented
Using JSON.stringify
in JS, there is a replacer
function that can be provided.
This serves for as a point-of-serialize coercion of values and offers an alternative way to handle the hard problem of coercing to JSON.
I think it'd be a good idea to implement here.
For the case of excluding keys, I've settled on the behaviour of
- Exclude the field -
nil
- Include the field -
t
- Include the field, and use a replacement value
(values t "replacement")
fstamour commented
Can this be closed now? If not, what's left?
Zulu-Inuoe commented