# dmd.json

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

#### Authors

Walter Bright

#### License

Boost License 1.0

Source: json.d

Documentation: https://dlang.org/phobos/dmd_json.html

Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/json.d

- `json_generate`

  #### Declaration

  `void `json_generate`(ref Modules `modules`, ref OutBuffer `buf`);`

  Generate json for the `modules`.

  #### Parameters

  `Modules `modules`` | array of Modules
  `OutBuffer `buf`` | write json output to `buf`

- `jsonFieldNames`

  #### Declaration

  `enum string `jsonFieldNames`;`

  A string listing the name of each JSON field. Useful for errors messages.

- `tryParseJsonField`

  #### Declaration

  `JsonFieldFlags `tryParseJsonField`(const(char)* `fieldName`);`

  Parse the given ``fieldName`` and return its corresponding JsonFieldFlags value.

  #### Parameters

  `const(char)* `fieldName`` | the field name to parse

  #### Return Value

  JsonFieldFlags.none on error, otherwise the JsonFieldFlags value corresponding to the given `fieldName`.