Task #27243
Implement Optional type to handle optional fields in web service requests
Start date:
05/05/2025
Due date:
% Done:
0%
Estimated time:
Description
We need a way to distinguish between fields that were explicitly provided in JSON requests and fields that were omitted entirely. We used to use pointers to identify this but using generics we can design a simple solution. Optional[T]
type with a custom unmarshaler can correctly detects when a field is provided vs not provided in JSON and provide simple way to identify and get the value correctly compared to handling pointers.