You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this situation, I want to serialize class_name and long_name, but I'd like to omit data_variables and methods. How can I force it to not handle them (in a way other than creating a dummy *_to_yojson implementation)?
My suggestion is something like [@opaque] for visitors ppx.
The text was updated successfully, but these errors were encountered:
Just FYI, my work-around has been to use [@default …] on those fields like you, and to pass a masked copy of the records of interest to Yojson, with those fields set to their default values. They won't be output.
(Of course, Base/Core redefine (=) to be integer-specific which limits ppx_deriving_yojson's checks for default values (#79), so we have to work around that too.)
I'd like to omit some keys (with complex values) from being serialized/deserialized and managed by
ppx_deriving_yojson
.In this situation, I want to serialize
class_name
andlong_name
, but I'd like to omitdata_variables
andmethods
. How can I force it to not handle them (in a way other than creating a dummy*_to_yojson
implementation)?My suggestion is something like
[@opaque]
forvisitors
ppx.The text was updated successfully, but these errors were encountered: