code: func NewJSONRobot(robot *Robot) *JSONRobot {
  	jsonRobot := &JSONRobot{
  		Name:        robot.Name,
  		Commands:    []string{},
  		Connections: []*JSONConnection{},
  		Devices:     []*JSONDevice{},
  	}
  
  	for command := range robot.Commands() {
  		jsonRobot.Commands = append(jsonRobot.Commands, command)
  	}
  
  	robot.Devices().Each(func(device Device) {
  		jsonDevice := NewJSONDevice(device)
  		jsonRobot.Connections = append(jsonRobot.Connections, NewJSONConnection(robot.Connection(jsonDevice.Connection)))
  		jsonRobot.Devices = append(jsonRobot.Devices, jsonDevice)
  	})
  	return jsonRobot
  }
docs: // NewJSONRobot returns a JSONRobot given a Robot.