On Saturday, 15 October 2016 at 17:36:10 UTC, Gustav wrote:

I want to use the variables from dub.json. For example, use the parameter "name" to display information message. Now I read dub.json. Is there a way to import them?

Please excuse any mistakes as English is my second language.

I don't know wether there's a dub specific API but you could use string imports for that:

auto dubFile = import("dub.json");
// then parse it with your favourite json lib

You have to use the -J flag for dmd to know where to find dub.json though.

Reply via email to