)]}'
{
  "commit": "2b65794b3242931031ec39f800432a9d11e4b853",
  "tree": "1d1d0eeb0db55308aa2287ed99f376c17be021f9",
  "parents": [
    "2b106dff33b8bc3ea9e4168f9f32578ea1994cc6"
  ],
  "author": {
    "name": "nekleo",
    "email": "96453741+nekleo@users.noreply.github.com",
    "time": "Sat Mar 25 06:51:56 2023 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Sat Mar 25 09:51:56 2023 -0400"
  },
  "message": "Add JSON as a format option for `targets` command in `build_examples.py` (#25810)\n\n* Add JSON as a format option for `targets` command\r\n\r\nThe `targets` command outputs the targets that are available for the\r\n`build` and `gen` commands in a string format that is easy to read but\r\nhard to parse. This change adds a option for the `targets` command to\r\noutput JSON so that the available targets can be more easily parsed.\r\nTo do this, ToDict methods were added to BuildTarget and TargetPart\r\nclasses. When the `--format json` option is used with the `targets`\r\ncommand `build_examples.py` calls the ToDict method of each BuildTarget\r\nobject and outputs to stdout a list of Dicts in JSON, one for each\r\nBuildTarget.\r\n\r\n* Restyled by autopep8\r\n\r\n* Restyled by isort\r\n\r\n* Simplfy code (loops) for creating Dicts and Lists\r\n\r\nSimplied the code that ceates dictionaries and lists from data contained\r\nwithin the BuildTarget and TargetPart objects. Also, corrected\r\nsome comments, and put List and Dict types where appropriate.\r\n\r\n* Fixed BuildTarget ToDict method\r\n\r\nBuildTarget ToDict method was incorrectly converting the\r\nfixed_targets list to a dictionary, losing data.\r\n\r\n* Changed ToDict of BuildTarget to use a list of lists.\r\n\r\nEach time AppendFixedTargets method of BuildTarget is called, a list of\r\nTargetPart objects is appended to the fixed_targets list. This change\r\nperserves the developer\u0027s intent by keeping the list of lists structure\r\nintact rather than flatting it out into one list.\r\n\r\n---------\r\n\r\nCo-authored-by: Restyled.io \u003ccommits@restyled.io\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "63c278a233cb57ea1aa639511b90cbd53f4f859a",
      "old_mode": 33188,
      "old_path": "scripts/build/build/target.py",
      "new_id": "8411ff9432c2c71f702413db78db928ee11d2800",
      "new_mode": 33188,
      "new_path": "scripts/build/build/target.py"
    },
    {
      "type": "modify",
      "old_id": "c70a5da7981d492fe9f764955211758993963f7f",
      "old_mode": 33261,
      "old_path": "scripts/build/build_examples.py",
      "new_id": "a52c9aa6f3e13149362f26c56f43db9072318c70",
      "new_mode": 33261,
      "new_path": "scripts/build/build_examples.py"
    }
  ]
}
