ppx_deriving_yojson
ppx_deriving_yojson copied to clipboard
to_yojson ?(omit_defaults=true)
It would be nice if one could also enable the output of default values.
Yes. I will not have time to implement it soon, though.
@vogler do you mean disable the output of default parameters?
I am conversing with an API which does not handle { blabla: null } the same way as {} and this feature would also be useful to me.
Should this be an additional parameter to the [@@deriving] annotation?
@michipili Yes and yes.
I worry that this isn't flexible enough perhaps. Shouldn't this be controllable at the field label level?
Makes sense.
@rgrinberg This is definitively right!