JSON Output

JSON Output

If you'd like to feed TooLoo information into other tools that speak JSON external link icon you can retrieve the full list, and details of a specific command.

There are two commands to facilitate JSON on the command line.

  • show-json <command_name> Generates JSON with the details of the command. Contains the same information you'd see from the show command but in JSON format.

    {
      "version": "2.0.0",
      "status": 200,
      "command": {
         "name": "foo",
         "type": "executable"
         ...
      }
    }
  • list-json Generates JSON with the name and short description of each command.

    {
      "version": "2.0.0",
      "status": 200,
      "commands": [
          {
          "name": "foo",
          "type": "executable"
          ...
          },
          {
          "name": "bar",
          "type": "executable"
          ...
          }
      ]
    }

TooLoo also has a built-in REST API Server you can use to retrieve the same data over HTTP.