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

monkyyy crazymonkyyy at gmail.com
Fri Oct 4 17:25:43 UTC 2024


On Friday, 4 October 2024 at 08:45:49 UTC, holyzantaclara wrote:

> Is there a way to achieve this?

>> dub concerns
>> ctfe risky

whats this fud about?

> Will try to generate a .d file that would contain a static D 
> object instead and then compile this .d file.

While ctfe json is bad, you should still try to ctfe; without 
clarification of what the data is idk, but if you could get 
something like csv that would be trivial.


More information about the Digitalmars-d-learn mailing list