On Wed, Nov 16, 2016 at 11:32 PM, Tim Bezhashvyly <[email protected]
> wrote:
> Is is possible to read a JSON which is array of objects? Like [ {}, {}, {}
> ]? In my example I have { "shows" : [ {}, {}, {} ] } and I'm catching a
> field by name but I'm wondering if it is possible to capture root array
> node.
>
If your decoder is (Json.list decoder) than it will capture the data from a
json like [ {}, {}, {} ]
It would look like this:
decoderColl : Json.Decoder (List Show)
decoderColl =
Json.list decoder
--
There is NO FATE, we are the creators.
blog: http://damoc.ro/
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.