Closed arjanadriaanse closed 4 years ago
Also, it is preferable to omit unset optional values from the resulting JSON entirely. This is also something that should be handled in the JSON streaming process.
A possible solution is suggested here: https://lists.freepascal.org/pipermail/fpc-pascal/2020-April/057831.html
Some values in the LSP should be optional. This partly works for object types in Pascal, which can be set to
null
, but not for others. One option is to use the variant type in these cases, causing type safety to be lost. Another option could be to somehow make the JSON streaming deal with these cases.