Deserialising JSON with asdf when a field is unexpectedly null
Sergey
kornburn at yandex.ru
Wed Apr 2 16:47:36 UTC 2025
On Wednesday, 2 April 2025 at 15:37:46 UTC, Anonymouse wrote:
> I'm trying to replace my use of `std.json` with `asdf`.
> What should I do? I don't want to just catch the exception but
> so far that's the best solution I have.
```d
struct S
{
static struct Inner
{
string s = "foo";
}
@serdeOptional
Nullable!(Inner) inner = Inner.init;
}
```
seems working
More information about the Digitalmars-d-learn
mailing list