How to evaluate a JSON file at compile time and create a struct out of it?

Salih Dincer salihdb at hotmail.com
Fri Oct 4 16:58:02 UTC 2024


On Friday, 4 October 2024 at 08:45:49 UTC, holyzantaclara wrote:
> Hello hello everyone ^_^,
>
> I am new in D, and started this morning. I found a way to read 
> a file at compile time with `-J.` and `static string content = 
> import("my_json_file.json")`
>

https://dlang.org/spec/expression.html#import_expressions


More information about the Digitalmars-d-learn mailing list