Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.


Code for generating .json descriptions of the module when passing the -X flag to dmd.

Source json.d

void json_generate(ref Modules modules, ref OutBuffer buf);
Generate json for the modules.
Modules modules array of Modules
OutBuffer buf write json output to buf
enum string jsonFieldNames;
A string listing the name of each JSON field. Useful for errors messages.
JsonFieldFlags tryParseJsonField(const(char)* fieldName);
Parse the given fieldName and return its corresponding JsonFieldFlags value.
const(char)* fieldName the field name to parse
JsonFieldFlags.none on error, otherwise the JsonFieldFlags value corresponding to the given fieldName.