Detecting and avoiding infinite loops in the menus API JSON

While unusual, it is technically possible for the following menu structure to be created in Toast Web:

  • Menu Item A includes Modifier Group B

  • Modifier Group B includes Modifier Option C

  • Modifier Option C's menu item reference is Menu Item A

This configuration can create an infinite loop that prevents a menu from being resolved. If your integration encounters a modifier option whose item reference is the same as the modifier option's parent menu item (Menu Item A in the example above), your integration should stop looping through the menu JSON and not display the modifier option.

Note

For information about modifier option item references, see Understanding a modifier item reference.