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
I want to track when unknownValue occurs when parsing fromJson for enum type, so that I can fix the model or tell the BE if something unexpected happen.
In order to do that, I guess we need to be able to inject custom deserialization method, not just mapping. Just like fromJson and toJson in JsonKey.
The text was updated successfully, but these errors were encountered:
Meaning, if the value in serialized format is 'hidden', its converted to MyFormType.unknown.
I actually see the $enumDecode has an unknownValue paramete that does just that. I just don't know how to cause the generator to use it.
Also:
From previous issues: #778, #653
There seems to be a want to be able to convert enums manually as well ie. have a generated function. Would it be possible to mark a the decoding and encoding functions to be public? Or maybe be able to set them a name?
This way we could optimize away the $enumDecode function and reuse the decoders/encoders throughout the codebase.
I want to track when
unknownValue
occurs when parsing fromJson for enum type, so that I can fix the model or tell the BE if something unexpected happen.In order to do that, I guess we need to be able to inject custom deserialization method, not just mapping. Just like
fromJson
andtoJson
inJsonKey
.The text was updated successfully, but these errors were encountered: