decoding recursive JSON with argonaut - PureScript

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Mason Mackaman

how can I decode something like

newtype RecursiveObject
  = RecursiveObject { child :: Maybe RecursiveObject }

with argonaut? (independent of weather or not there are other keys in the record if possible)

TheMatten

You should simply be able to call your decoder recursively?

Mason Mackaman

wow, you're totally right. I was getting an error because I was doing it point free.