This Lesson is for PRO Members.

Subscribe today and get access to all lessons! Plus direct HD download
for offline use, member comment forums, and iTunes "podcast" RSS feed.
Level up your skills now!


Already subscribed? Sign In

Hide playlist

    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.

    Please take a moment to tell your friends:

    You must be a PRO Member to view code