Decode a JSON Category Tree or Navigation Tree into Elm
Some of our JSON data may have a recursive structure, especially trees such as the navigation trees or category trees that feature on many websites. When writing a decoder for a type with a recursive structure, you need to use the
lazy function, to avoid defining a decoder in terms of itself, which would cause an infinite loop.
This lesson assumes you're familiar with recursively defined union types in Elm.