keyword as struct field

partypooper pythonproof at gmail.com
Sun Feb 20 11:08:55 UTC 2022


Hello, I'm new to D.

Title is self described, is it possible to use keyword as struct 
field?

Maybe it is XYproblem, so here I will describe a little what I 
need.
I'm parsing some json currently with 
[mir-ion](https://code.dlang.org/packages/mir-ion) 
(better/simpler suggestions for only json de/serialization?), 
that has "version" as one of it's keys, so I can't use that as 
field in my struct. Maybe some annotation in mir library to parse 
"version" into other struct field name, can't find though (its 
docs pretty concise).


More information about the Digitalmars-d-learn mailing list